Understanding What Ephemeral Storage is and the Different Types
FAQs
By default, all storage used by a container is ephemeral. That is, it’ll get deleted if the container crashes and is restarted. Containers, by definition, are immutable, so their file systems cannot be changed while running. If we want to persist changes, we either need to define a non-ephemeral volume or store our data using some database. The MongoDB Kubernetes operator can be handy in this case.
Cloud storage is not ephemeral. If we need to create files and store them, we can use a service that implements Elastic Block Storage like OpenEBS or any of the major EBS services in the cloud providers.
Ephemeral data is temporary data that is created and used for a short period. This could be for a specific task, but then data is discarded.
Ephemeral storage is temporary storage tied to the lifespan of a specific compute instance. This means that the data is erased when the instance is erased. In contrast, persistent volumes offer storage that is independent of the lifecycle of any specific instance. This means the data remains available even if the instance is deleted or rescheduled.
An example of ephemeral data is the data stored in RAM, which is cleared when the computer is powered off. Other examples include temporary cache files and session data.
Get started with Atlas today
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools