EC2 - Placement Groups/ENI/Hibernate Flashcards

1
Q

What are Placement Groups in AWS, and what are the three types?

A

Placement Groups control how EC2 instances are placed within AWS infrastructure for performance, fault tolerance, and scalability.

Three Types:

Cluster Placement Group
Spread Placement Group
Partition Placement Group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Cluster Placement Group and its use case?

A

Instances in a Cluster Placement Group are placed within a single availability zone for low-latency, high-throughput networking (up to 10 Gbps).

Use Case: High-performance computing (HPC), big data processing, and applications that require high-speed communication between instances.

Trade-Off: If the AZ fails, all instances in the group fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Spread Placement Group, and when should you use it?

A

Spread Placement Groups distribute instances across different hardware in multiple availability zones for fault tolerance and high availability.

Use Case: Applications that need fault isolation and high availability (e.g., critical applications).

Limitations: Max 7 instances per AZ per placement group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Partition Placement Group, and how is it different from Spread?

A

Partition Placement Groups distribute instances across multiple partitions (isolated hardware racks) within or across availability zones for fault tolerance.

Use Case: Large-scale distributed systems like Hadoop, Cassandra, and Kafka.

Advantage: More scalable (up to hundreds of instances) and can span multiple AZs.

Difference from Spread: Partition groups offer isolation between partitions, making them more resilient to rack failures than spread groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the key benefit and limitation of each Placement Group type?

A

Cluster Placement Group:

Benefit: High performance with low latency and high throughput (10 Gbps).
Limitation: High risk—if the AZ fails, all instances fail.

Spread Placement Group:

Benefit: Fault tolerance by spreading instances across multiple AZs.
Limitation: Limited to 7 instances per AZ per group.

Partition Placement Group:

Benefit: Fault isolation across different hardware racks, scalable for large distributed applications.
Limitation: More complex setup but ideal for partition-aware applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an Elastic Network Interface (ENI) in AWS?

A

An Elastic Network Interface (ENI) is a virtual network card in a VPC that provides network connectivity to EC2 instances. It can also be used outside EC2 instances for other purposes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the key attributes of an ENI?

A

An ENI can have the following attributes:

Primary private IPv4
Secondary private IPv4 (can have multiple)
Elastic IPv4 or Public IPv4 (per private IP)
Security Groups attached
MAC Address
It is bounded to a specific Availability Zone (AZ).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can ENIs be created independently of EC2 instances?

A

Yes, ENIs can be created independently of EC2 instances. They can be attached on the fly to EC2 instances and moved between them for failover purposes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the significance of moving an ENI between EC2 instances?

A

Moving an ENI (e.g., from eth1 to another EC2 instance) allows you to move a private IP from one instance to another, enabling failover capabilities. This is useful for scenarios where an EC2 instance is accessed via a static private IP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the limitation of ENIs in terms of Availability Zones?

A

ENIs are bound to a specific Availability Zone (AZ), meaning an ENI created in one AZ can only be attached to EC2 instances in that same AZ.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is EC2 Hibernate?

A

EC2 Hibernate allows you to preserve the in-memory state of an EC2 instance, so when it is restarted, it resumes from where it left off, without needing to reload applications or data into memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does EC2 Hibernate differ from EC2 Stop and Terminate?

A

Stop: Preserves data on EBS but requires a full boot on restart.
Terminate: Deletes instance data unless specified otherwise.
Hibernate: Saves the RAM state to EBS, allowing faster restart without full OS boot.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where is the in-memory state stored during EC2 Hibernate?

A

The RAM state is written to the root EBS volume when hibernating the EC2 instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the requirements for using EC2 Hibernate?

A

The root EBS volume must be encrypted and large enough to store the RAM.

The instance must have less than 150 GB of RAM (varies).

Hibernation is not supported on bare metal instances.

Supports Linux and Windows operating systems.

Works with on-demand, reserved, and spot instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens during the EC2 Hibernate process?

A

The instance stops.
The RAM state is written to the root EBS volume.
The instance shuts down.
Upon restart, the RAM state is loaded from the EBS volume back into the instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the primary use cases for EC2 Hibernate?

A

Long-running processes that need to maintain state without restarting.
Faster reboot to avoid service initialization delays.
Saving the RAM state for faster recovery.

17
Q

How long can an EC2 instance be hibernated?

A

EC2 instances can be hibernated for up to 60 days.

18
Q

Can EC2 Hibernate be used with any EC2 instance type?

A

Yes, EC2 Hibernate works with a variety of instance types, including on-demand, reserved, and spot instances.

19
Q

What is the limitation on RAM size for EC2 Hibernate?

A

The instance’s RAM size must be less than 150 GB to use Hibernate.