EC2 Networking Fundamentals Flashcards

1
Q

In Networking, what are the type types of IPs?

A
  • IPv4: most common format used online
    (ex: 1.160.10.240)
  • IPv6: newer; solves problems for Internet of Things (IoT) (ex: 3ffe:1900:4545:3:200:f8ff:fe21:67cf)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Public IP (IPv4)?

A
  • 🌎 machine can be identified on public internet (WWW)
  • 🥇unique across whole web (NO two machines can have same public IP)
  • 📍geo-located easilty

💡 TIP: if EC2 machine is stopped & then started, public IP can CHANGE

public IP used to SSH into EC2 Machine

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

What is a Private IP (IPv4)?

A
  • 🔓 machine can be identified on private network ONLY
  • 🥇🥇unique across private network (BUT two different private networks (two companies) can have same IPs
  • 🚪machines connect to WWW using a NAT + internet gateway (proxy)
  • 📝 ONLY specified range of IPs can be used as private IP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Elastic IP?

A

fixed public IPv4 IP that can be attached to an EC2 instance;
Attached Elastic IP will NOT change if EC2 is stopped & restarted

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

When is it recommended to use an Elastic IP?

A

mask failure of instance or software by rapidly remapping address to another instance
* NOTE: public IP can change when instance is stopped & started

✨ Best Practice: AVOID using Elastic IP
* often poor architectural decision
* Alternative 1: Random public IP & register a DNS name to it
* Alternative 2: Load Balancer & don’t use a public IP

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

What is a Placement Group?

A

specified strategy to control the placement of EC2 instances

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

What are the 3 Placement Group strategies?

A
  • Cluster: high-performance; clusters instances into a low-latency group in a single Availability Zone (AZ)
  • Spread: critical; spreads instances across underlying hardware (max 7 instances per group per AZ)
  • Partition: distributed; spreads instances across many different partitions (which rely on different sets of racks) within an AZ. Scales to 100s of EC2 instances per group
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the pros & cons of using the Cluster Placement Group strategy?

A

✅ PROS:
* great, low-latency network (10 Gbps)

⛔️ CONS:
* Instanced place on Same Rack & Same AZ
* If rack fails, ALL instances fail at same time

Use Cases:
* Big Data job that needs to complete fast
* App that needs extremely low latency & high network throughput

high performance workloads

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

What are the pros & cons of using the Spread Placement Group strategy?

A

✅ PROS:
* spread across Availability Zones (AZ)
* reduced risk in simultaneous failure
* EC2 instances are on different physical hardware

⛔️ CONS:
* limited to 7 instances per AZ per placement group

Use Cases:
* App that needs to maximize high availability
* Critical Apps where each instance must be isolated from failure from each other

critical workloads

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

What are the pros & cons of using the Partition Placement Group strategy?

A

✅ PROS:
* up to 7 partitions per AZ
* can span across multiple AZs in same region
* up to 100s of EC2 instances
* instances in partition do NOT share racks with instances in other partitions
* partition failure can affect many EC2 but will NOT affect other partitions
* can access partition info as metadata

Use Cases:
* HDFS
* HBase
* Cassandra
* Kafka

distributed workloads

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

What is an Elastic Network Interface (ENI)?

A

logical component in a VPC that represents a virtual network card that contains
* Primary private IPv4, one or more secondary IPv$
* 1 Elastic IP (IPv4) per private IPv4
* 1 Public IPv4
* …

Can create ENI independently and attach them on the fly (move them) on EC2 instances for failover (bound to specific AZ)

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

What is the difference between Stop & Terminate of an EC2 instance?

A
  • Stop: data on disk (EBS) is kept intact in next start
  • Terminate: any EBS volumes (root) also set-up to be destroyed is lost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the requirements & benefits for using EC2 Hibernate?

A
  • in-memory (RAM) state is preserved
  • 🚀 instance boot is much faster! (OS is NOT stopped/restarted)

How it works:
* RAM state is wrriten to a file in the root EBS volume
* Root Volume MUST be EBS (not Instance store), Encrypted, & large
* Available for On-Demand, Reserved, & Spot instances
* instance can NOT be hibernated more than 60 days

Use Cases:
* Long-running processing
* Saving the RAM state
* Services that take time to initialize

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