Interactive Erasure Coding Explorer for Distributed Storage Engineers
Stop guessing. Start seeing the trade-offs.
Live Demo Β· δΈζζζ‘£ Β· Report Bug
They share the same storage overhead β but everything else is different.
EC(6,3) tolerates 3 simultaneous failures instead of 2. It also demands 9 I/Os per write instead of 6, and needs to read 6 chunks to repair a single lost block instead of 4. These hidden dimensions β repair bandwidth, degraded read latency, cascading failure risk β are the trade-offs that take senior engineers years to internalize.
Erasure Lab makes them visible in seconds.
Β Β Β Β π Try it now β ec-lab.steinslab.ioΒ Β Β Β
Erasure Lab is a pure-frontend, embeddable, interactive web tool built as an Explorable Explanation β a format where reading and interacting are inseparable. It helps distributed storage engineers build engineering intuition about encoding scheme trade-offs through direct manipulation.
Drag a slider. Kill a node. Watch the math come alive.
| Type | Description |
|---|---|
| Replication | N-way copies (e.g., 3-replica) β simple, expensive, fast repair |
| Erasure Coding (EC) | Reed-Solomon style (k data + m parity) β space-efficient, higher I/O |
| LRC | Local Reconstruction Codes β local parity groups for faster repair |
Drag sliders to adjust k, m, replica count, AFR, MTTR, and cluster size. Every chart, metric, and formula updates in real-time (<16ms) β no "Calculate" button, no page refresh.
Simultaneously visualize the metrics that actually matter:
- Storage Overhead β Capacity bar showing raw vs. effective storage
- Fault Tolerance β Maximum simultaneous failures survived
- Repair Cost β Chunks read per single-block repair
- I/O Fan-out β Write amplification per operation
- Deployment Threshold β Minimum nodes required
- Durability β Annual data loss probability (Markov chain model)
- Read Performance β Degraded-mode read penalty
- Compute Overhead β Encoding/decoding computational cost
Overlay multiple encoding schemes on a single radar chart. Instantly spot where LRC wins on repair cost but loses on storage, or why 3-replica dominates on read performance.
Click to "kill" nodes on an interactive grid. Watch the system transition through Safe β Degraded β Data Lost states. Compare how EC(4,2) and EC(6,3) behave under identical failure scenarios.
Every computed result has an expandable formula panel powered by KaTeX. Variables are live-bound to your slider values β change a parameter and watch the math update in real-time. No black boxes.
Includes full Markov chain derivation for durability probability with intermediate state transition visualization.
One-click presets for industry-standard configurations:
- Ceph default EC(4,2)
- HDFS 3-Replica
- Azure LRC(10,4,2)
- And more...
- Dark / Light Theme β Engineer-friendly dark mode by default
- PWA Offline Support β Works completely offline, install as a desktop app
- i18n β English and Chinese interface
- Embeddable β Drop into any wiki, blog, or internal platform via iframe
- Zero Backend β Pure static site, deploy anywhere
Visit ec-lab.steinslab.io β no installation required.
git clone https://github.com/user/erasure-lab.git
cd erasure-lab
npm install
npm run devOpen http://localhost:5173 in your browser.
npm run build # Production build β dist/
npm run preview # Preview production build locallynpm test # Run all tests
npm run test:coverage # With coverage report| Layer | Technology |
|---|---|
| Framework | React 19 + TypeScript |
| Build | Vite 7 |
| State | Zustand (selector-based, <16ms update budget) |
| Charts | Recharts + Custom SVG |
| Math | KaTeX (synchronous rendering) |
| Styling | Tailwind CSS 4 + Shadcn UI |
| Validation | Zod |
| Testing | Vitest + Testing Library |
| PWA | vite-plugin-pwa |
src/
βββ engine/ # Pure math β zero UI dependencies, 100% tested
β βββ erasureCode.ts # EC/LRC/Replication calculations
β βββ probability.ts # Markov chain durability model
β βββ simulation.ts # Node failure state machine
βββ store/ # Zustand state β the only bridge between engine and UI
βββ components/
β βββ charts/ # RadarChart, NodeGrid, IOFanout, PersistenceFlow...
β βββ controls/ # ScrubbableSlider, PresetCard, ParameterPanel...
β βββ math/ # FormulaBlock, MathBlock (KaTeX rendering)
β βββ content/ # Explorable Explanation article renderer
βββ content/ # Article content (narrative + embedded interactives)
βββ locales/ # i18n translations
Key architectural invariant: engine/ never imports from store/ or components/. UI never calls engine/ directly β all computation flows through the store.
Contributions are welcome! Whether it's a bug fix, new encoding scheme, or improved visualization β feel free to open an issue or submit a pull request.
npm run lint # Lint check
npm run format:check # Format check
npm test # All tests must passThis project is an interactive utility for the Distributed Storage Roaming Guide.
Erasure Lab provides interactive engineering intuition. Together, they help you build a distributed storage knowledge system and technical intuition.
Built for the engineers who care about every bit.
ec-lab.steinslab.io
