EC2 Hibernate Feature
Overview
EC2 Hibernate is a feature that allows you to preserve the in-memory (RAM) state of your EC2 instance, enabling faster boot times upon restart.
Key Points
- Data Preservation: When an EC2 instance is hibernated, the RAM content is saved to the root EBS volume.
- Faster Boot: The operating system is not stopped or restarted but is frozen, which allows for a much quicker boot time.
- EBS Requirements: The root EBS volume must be encrypted and have enough space to store the RAM content.
- State Restoration: Upon restart, the RAM content is loaded from the EBS volume back into the instance's memory as if it never stopped.
How it Works
- An EC2 instance is running with data in RAM.
- Initiate hibernation; the instance enters the 'stopping' state.
- RAM is dumped to the root EBS volume.
- The instance is shut down, and RAM is cleared.
- Upon starting the instance, RAM is loaded from the EBS volume to memory.
Use Cases
- Long-Running Processes: Keep processes running without actual stoppage.
- RAM State Preservation: Save the RAM state for various reasons.
- Fast Boot: Quickly boot instances with services that have lengthy initialization times.
Considerations
- Instance Families: Supports various families, but not bare metal instances.