Ephemeral Storage
Every container on Bahriya ships with a small amount of fast, local scratch space called ephemeral storage. It's automatically attached to every replica with no setup required — you write files to the container's filesystem and they go here.
How it works
- Every container gets 3 GB of ephemeral storage for free.
- You can increase the size up to 10 GB per pod in 1 GB steps.
- The first 3 GB are always included at no charge. Anything beyond 3 GB is billed at $0.10 per GB per month, billed per minute.
What it's for
Ephemeral storage is a good fit for:
- Temporary files your application writes while a request is in flight.
- Cached build artefacts.
- Temporary upload buffers that you then push to object storage.
- Anything you would have written to
/tmp on a regular server.
What you need to know
Ephemeral storage is, as the name suggests, ephemeral. It lives only for the lifetime of the pod. When a replica restarts, scales away, or is rescheduled, everything in its ephemeral storage is gone. This is by design — ephemeral storage is fast and local, and the trade-off for that speed is that it isn't durable.
If you need data that survives restarts, use persistent storage instead.
Choosing a size
Start with the 3 GB default. If your container is restarted because it ran out of disk (you'll see an Evicted: DiskPressure event), increase the size in 1 GB increments until the restarts stop. There is no need to over-provision — you only pay for what you set.
Billing
- First 3 GB: free.
- Each additional GB: $0.10 per GB per month, billed per minute.
- Billing applies whenever the container is running.
| Ephemeral storage | Monthly cost |
| 3 GB | Free |
| 5 GB | $0.20 |
| 7 GB | $0.40 |
| 10 GB | $0.70 |