Back to Hub

K8s Storage IOPS Race Sim.

Simulate the performance trade-offs between Kubernetes Ephemeral Storage (EmptyDir) and Persistent Volumes (PV) for high-throughput data processing.

## Kubernetes Storage: Speed vs. Durability

When designing stateful applications in Kubernetes, you must choose between the high speed of local ephemeral disks and the durability of network-attached Persistent Volumes (PVs). This tool profiles the massive IOPS gap often found in cloud environments like AWS (EBS vs. Instance Store).

### Ephemeral Storage (EmptyDir)

Local SSDs mounted as `emptyDir` offer incredible performance because they communicate over the PCIe bus rather than the network. This is ideal for scratch space, temporary caches, and shuffle storage for big data jobs (Spark/Flink). However, if the pod is rescheduled, the data is gone forever.

### Persistent Volumes (PV)

Network storage provides durability and the ability to mount the same volume even if the pod moves to a different node. The trade-off is 'Network Latency' and shared bandwidth. Many cloud-managed PVs have IOPS limits (e.g., GP3 tiers) that can create massive bottlenecks for database workloads.

### FAQ

**Q: When should I NEVER use ephemeral storage?**
A: For any primary database or user-generated content that isn't backed up or replicated elsewhere. Loss of a node means permanent data loss.

**Q: What is 'IOPS Bursting'?**
A: Some PV types allow you to exceed your provisioned IOPS limit for short periods. This is good for spikes but dangerous for sustained high-throughput workloads as the 'Burst Bucket' eventually empties.

**Q: Does NVMe make a difference?**
A: Yes. Modern local NVMe drives can handle millions of IOPS, making network-attached storage look like a floppy disk by comparison. If your workload is IO-bound, optimized instances with local storage are usually cheaper than high-provisioned EBS volumes.