# Chaos Engineering and How to Manage Data Stages in Large-Scale Complex Data Flow

- Speaker: [Einat Orr](/wiki/speakers/einat-orr.md)
- Event: [Reversim Summit 2024](/wiki/years/2024.md)
- Video: https://www.youtube.com/watch?v=TMoIEX_0DiI
- Transcript: [/transcripts/2024/18-TMoIEX_0DiI.md](/transcripts/2024/18-TMoIEX_0DiI.md)
- Language: Hebrew and English · Type: talk · Level: intermediate
- Topics: [Debugging](/wiki/topics/debugging.md), [Data Science](/wiki/topics/data-science.md), [Databases](/wiki/topics/databases.md), [Data Engineering](/wiki/topics/data-engineering.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker shares a painful production incident involving a data retention script that accidentally deleted a petabyte of data, highlighting the unique challenges of maintaining reliability in large-scale data systems. The talk introduces chaos engineering as a methodology to proactively test data pipelines and infrastructure against unexpected failures before they reach production. Furthermore, the speaker discusses how adopting data version control can provide Git-like capabilities for data lakes, enabling safe staging environments, pre-merge tests, and isolated pipeline runs. Ultimately, listeners learn how combining chaos engineering with data version control significantly improves the resilience and reliability of complex data architectures.

## Key points

- [1:00](https://www.youtube.com/watch?v=TMoIEX_0DiI&t=60s) An accidental hard delete of a petabyte of data occurred in production due to a poorly scoped retention script.
- [4:02](https://www.youtube.com/watch?v=TMoIEX_0DiI&t=242s) Recovering the deleted data took three weeks because the exact snapshot state at the time of deletion was unknown.
- [8:14](https://www.youtube.com/watch?v=TMoIEX_0DiI&t=494s) Chaos engineering is a methodology that involves introducing controlled failures into a staging environment to test system resilience.
- [11:46](https://www.youtube.com/watch?v=TMoIEX_0DiI&t=706s) Applying chaos engineering to data systems requires defining steady states that include data quality metrics, duplication handling, and SLAs.
- [21:59](https://www.youtube.com/watch?v=TMoIEX_0DiI&t=1319s) Data version control uses pointers and metadata layers to bring Git-like branching and merging capabilities to data lakes.
- [25:08](https://www.youtube.com/watch?v=TMoIEX_0DiI&t=1508s) Branching and pre-merge hooks can be used to test new data ingestions safely before merging them into production.

## Takeaways

- Incorporate chaos engineering into data pipelines by regularly testing staging environments with simulated failures.
- Define strict steady-state metrics for data systems, covering not just infrastructure health but also data quality and schema consistency.
- Utilize data version control to enable branching and fast rollbacks when data operations or scripts fail.

## Questions this talk answers

- How do you apply chaos engineering principles to big data systems and data lakes?
- What is the best way to test data retention and deletion scripts without risking production data?
- How can data version control help prevent bad data from propagating through complex pipelines?

## Technologies

Git, Spark, Kafka, Presto

## Tags

chaos engineering, data governance, data pipelines, data reliability, data version control, production incidents
