Section 5/6: EC2 Fundamentals & Solutions Architecture Flashcards

1
Q

What are the four EC2 pricing models?

A

1) On demand
2) Reserved
3) Spot
4) Dedicated host

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

Cheapest EC2 pricing?

A

Spot instances (up to 90% discount)

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

EC2 Spot Instance use cases

A

Stateless workloads resilient to failures like big data / data analysis

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

What are EC2 Spot Instances?

A

Bidding on capacity that isn’t being used & can be kicked off if someone bids higher.
Define the max spot price and get the instance when current spot price is below your max spot price.

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

What are spot instances not good for?

A

DBs, critical jobs or any persistent workloads

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

What are the four types of EC2 instances?

A

1) general purpose
2) Compute optimized
3) Memory Optimized
4) Storage optimized

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

Why use a General purpose EC2 instance?

A
  • Diversity of workloads (web servers / code repos)
  • Balance between compute, memory, networking
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why use a Compute Optimized EC2 instance?

A
  • great for compute intensive tasks
  • high performance computing, ML, modeling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why use a Memory Optimized EC2 instance?

A
  • For storage intensive tasks
  • Databases, data warehousing, caching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two types of spot fleet termination requests?

A

1) One-time request
2) Persistent Request

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

What is a one-time Spot Fleet termination request?

A

If current spot price > max price you can choose to stop or terminate instance with a 2 minute grace period
Persistent request

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

What is a persistent-request Spot Fleet Termination Request?

A

Terminate instance, but as soon as the spot price goes back below your spot price, the instance is going to get relaunched

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

Identifying devices using a Public vs Private IP?

A

Public IPs are used to identify a device outside a network.
Private IPs are used to identify a device within a local network.

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

IPv4 vs IPv6?

A

IPv4 is older and running out of addresses. IPv6 is newer and solves problems of IPv4

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

When you stop and start an EC2, what happens to it’s IP address?

A

The EC2 instance’s public IP address can change

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

What is an Elastic IP, and when would we use it?

A

An Elastic IP is a public IPv4 you own as long as you don’t delete it, and can only be attached to one instance at a time. use an Elastic IP if you want to assign a fixed public IP for your instance.

17
Q

Should you try to avoid using Elastic IP?

A

Yes, because:
Reflects poor architectural decisions,
Better to use a random public IP and register a DNS name to it,
Or ever better use a Load Balancer and don’t use a public IP

18
Q

What is an ENI?

A

Elastic Network Interface, a virtual netowrk card that automatically attaches to EC2s. Allows primary private IPv4 addresses from address ranges of a VPC. Basic networking.

19
Q

Why use an ENI (elastic network interface) with ENA?

A

Enhanced networking. ENI’s provide high performance networking capabilities, and should be used when you want good network performance for no additional charge & its available.

20
Q

What is an Elastic Fabric Adapter?

A

Network device to accelerate High Performance Computing (HPC) and ML operations

21
Q

What are the 3 EC2 Placement Group types?

A

1) Clustered
2) Spread
3) Partitioned

22
Q

Clustered EC2 placement group: Pros, Cons, Use cases?

A

Pro: great networking
cons: If the group fails, all instances fail, all instances in singe AZ
Use Cases: 1) Low Network Latency (high network performance)
2) Big data jobs that need to be done quickly
3) Recommended for homogenous instance types

23
Q

Spread EC2 Placement group: Pro’s, Con’s, Use Cases?

A

Pros: great for critical apps, as each EC2 is placed on distinct underlying physical hardware. Can spam across AZ, reduces risk of simultaneous failure
Cons: Can only run 7 instances per AZ
Use Cases: For apps with small number of critical instances that need to be kept separate, and maximize availability

24
Q

Partitioned EC2 Placement group: Pro’s, Con’s, Use Cases?

A

Pros: good for distributed apps, as groups are divided into logical segments. Can span multiple AZs in the same region, with 100s of EC2s. Partition failures can affet many EC2s, but not all (isolate hardware failure)
Use Cases: Services that can be partitioned like Cassandra

25
Q

Explain the two EC2 Hibernate options

A

1) Can stop instances (keeping data intact until next start)
2) Can terminate instances, so any EBS volumes set-up to be destroyed are lost.

26
Q

EC2 Hibernate Limitations

A

1) Can’t hibernate for more than 60 days
2) Instance RAM must be < 150 GB
3) Can’t hibernate instances in ASG or ECS, doesn’t support all EC2 instance families / AMIs

27
Q

What does an EC2 instance retain from hibernation?

A

1) Instance ID
2) Private IPv4 Address & all IPv6 Addresses
3) Elastic IPs

28
Q

EC2 Hibernate is..? Use cases?

A

Hibernate is basically the same as a regular computer hibernating. Use case: Saving Ram State, as hibernate is good for long-running processes that take long to initialize.

29
Q

What is EC2 Nitro, and what does it provide?

A

Nitro is a new virtualization technology for the next generation of EC2. Provides better performance for EBS, networking, and better underlying security

30
Q

How do you optimize EC2 CPU?

A

Increase the number of CPU cores and the number of threads per core (1 thread per CPU is useful for HPC workloads)

31
Q

What is EBS?

A

Elastic Block Storage.
Persistent block storage attached to EC2 instances while they run. Allows instances to persist data even after termination.

32
Q

EBS (elastic block storage) analogy

A

EBS volumes are “network USB sticks”, not physical drives. They use the netwrok to communicate with the instance, so latency is possible

33
Q

EBS properties

A

1) Volumes are always in the same AZ as EC2 instance
2) Root EBS volume deleted with instance
3) Can detach volumes as additional disk, without stopping instance.