EC2 Hibernate is a feature
in AWS EC2 that lets twtech to pause its instances and resume it
later — just like putting a laptop to sleep instead of shutting it down.
twtech quick idea:
- When twtech hibernates an EC2 instance, AWS saves
the contents of the RAM (memory) to twtech instance’s root EBS volume.
- When twtech start the instance again, it loads the
RAM contents back — so all twtech processes, in-memory data, and open
sessions are exactly as they were.
- It's faster than a full reboot and twtech doesn't
lose any in-progress data.
Key things about
Hibernate:
- It only works on instances with EBS root volumes
(not instance store).
- RAM limit:
up to 150 GB.
- twtech need to enable hibernation at instance launch…so
twtech can’t just turn it on later.
- NB:
twtech is charged for the EBS storage and any other attached
resources while the instance is hibernated, but
not for compute time (since the instance isn’t running).
Common use cases:
- Spot instances where you want fast recovery.
- Long-running applications that you want to pause and
resume.
- Development environments you don't want to restart from
scratch every time.
twtech-Insights:
• It Supports Instance Families like: C3, C4, C5, I3, M3, M4, R3, R4, T2, T3...
• The Instance
RAM Size should be less than 150 GB.
• The Instance Size is not supported for bare
metal instances.
• It works
for these AMI: Amazon Linux 2, Linux
AMI, Ubuntu, RHEL, CentOS & Window.
• The Root
Volume should be EBS, encrypted, not instance store, and large.
• It is available
for On-Demand, Reserved and Spot Instances.
• Worth
noting, instances can NOT be hibernated more than 60 days.
Project:
(Hands-on)
How twtech launches instances with Hibernating feature enabled:
step-by-step:
Configure
to encrypt the EBS volume with aws key
Next:
Connect to instance (ssh) and run the uptime command to
see how long the instance has been runnig: uptime
The uptime command in Linux (and Unix-like systems) shows how long the
system has been running, along with other basic information like the number of
users and the system load averages.
When you type:
# bash
uptime
output:
# bash
15:24:36
up 12 days, 3:22, 3 users,
load average: 0.12, 0.08, 0.05
Here's what each part means:
- 15:24:36 → Current system time.
- up 12 days, 3:22 → The system has been running
for 12 days and 3 hours 22 minutes.
- 3 users → There are 3 users currently
logged in.
- load average: 0.12, 0.08, 0.05 →
The system load averages for the last 1, 5, and 15 minutes.
How twtech hibernates the instance eventually.
Select the instance, then go to instance state, and Hibernate instance
Confirm
hibernation:
Insights:
The stopped instance has data stored on the ebs volume.
twtech
may restart the instance at any time and its data will synchronize from the ebs
volume to the Ram.
Wait until instance status is
fully initialized : it may take a couple of minutes for data to
synchronize from EBS
to the RAM.
from
No comments:
Post a Comment