EC2 Flashcards

1
Q

EC2 and AZs relationship?

A
  • Instances are associated with a single AZ. If that AZ fails your instance also would likely fail.
  • You cannot connect resources in one AZ to an EC2 instance located in another AZ (storage, network etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 instances - is stopping/starting same as re-starting?

A

No, it is not. If a instance is stopped/started it could move to another host within the same AZ (not that it matters to the app ultimately).

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

Categories of EC2 instances?

A
  • General Purpose - diverse workloads, use this most of the times
  • Compute optimized - latest high performance CPUs for scientific needs
  • Memory optimized - large in memory datasets
  • Accelerated Computing - advanced and niche requirements (FPGA etc)
  • Storage optimized - large amounts of superfast local storage, massive IOPS (data warehousing, elastic search etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are instance stores?

A
  • Instance stores are block storage device which are local and not over the network
  • connected to one ec2 instance on one ec2 host
  • highest performance in aws
  • attach only at launch time (unlike ebs)
  • if instance moves from one host to another data on instance store is lost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When would you use EBS vs Instance Store?

A
  • Highly availability and reliability of storage
  • separate from EC2, persists separately
  • Region resilient backups
  • upto 64k ios and 1000Mib/s per volume
  • upto 80k iops and 2375 MB/s per instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When would you use instance stores?

A
  • Value - included in the cost
  • Performance: > 80k ops & 2375 MB/s
  • Temp storage volumes
  • stateless services (webservers, etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Elastic vs non-elastic Public IPs

A

If an instance is given a EIP it loses its non-EIP address

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

Exam Powerup

A
  • Secondary ENI + MAC address = Licensing
  • Diffferent Security Groups = multiple ENIs
  • Primary ENI is allocated to an instance by default
  • OS will never see the public IP address
  • IPV4 Public IPs are Dynamic - Stop & Start = IP will Change
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

AMIs Exam Power up!

A

AMI are unique to a region. Same AMI would have different id in a different region.

  • AMI Baking - taking a custom EC2 configured instance and baking it into an AMI
  • AMI cannot be edited - launch it, configure it and bake a new AMI
  • AMIs can be copied between regions
  • Permissions - default = only your account
  • Billed for capacity used by Snapshots
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Billing model of EC2?

A

On-Demand - hourly rate, billed in seconds, for new or uncertain application requirements, short-term, spiky workloads, unpredictable workloads which cannot have any disruption

  • Spot Pricing - cheapest, 90% off on-demand price, you can specify a max price you pay, if spot price goes above your max price the instance terminates, for apps that have flexible start/end times, apps should tolerate failure
  • Reserved Instances - upto 75% off in return for a commitment 1 or 3 years, Reserverd in region or AZ, scheduled reservations
  • Dedicated Hosts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Vertical Scaling

A
Vertical - resizing of instance, 
requires downtime/reboot, 
typically during outage windows, 
disruption, 
larger instances are \$\$$, 
works for all apps: no modifications required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Horizontal Scaling

A

Add more instances,
multiple running copies of your app running on smaller compute instances,
load balancer is required - between your servers and customers
Sessions are required for continuity of user experience - off host sessions

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

Explain ECS

A
  • Elastic Cluster Service
  • EC2 and Fargate
  • Container Definitions define container location
  • Task definitions encompass one or more Container Definitions and make up your “application” eg: database tier container, app tier container
  • Task role is the way to assign an IAM role to a task so it can assume temp credentials to interact with AWS
  • You create an ECS cluster and deploy tasks into that cluster
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Whats an ECS Service defnition?

A
  • A template of how many Tasks we want to deploy and how to scale them
  • you can deploy a load balancer to distribute load across multiple copies of the same task
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ECS Cluster modes

A
  • EC2 Mode: Cluster of EC2 instances deployed across AZs in a VPC with container engines running in them, you manage them via the standard EC2 tooling available, you pay for them the moment they are instantiated, not a “serverless” solution so you need to size them according to your needs
  • Fargate mode - no EC2 instances to manage, your images are deployed to a shared Fargate cluster, cluster is in your VPC/AZs, each task is injected into your VPC via ENIs, you can access the instances via these ENIs, only pay for containers for the resources they consume
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are Placement groups?

A

Grouping of EC2 instances for a certain purpose
- Cluster - pack instances close together, high level of performance, cannot span AZs, 10GBPs in SINGLE stream performance (exam!)

  • Spread - keep instances separate - instances use different hardware, resilient and HA, can span multiple AZs, located on separate infra racks, isolated power, network etc., limited to 7 instances/AZ hard limit, exam: spread achieves highest resiliency
  • Partition - groups of instances, each group is on different hardware, use for > 7 instances/AZ, no infrastructure sharing between the partitions, launch as many instances as needed in each partition, you can let AWS determine which partition an instance goes into or you can decide, max 7 partitions/AZ
17
Q

Enhanced networking

A
This is enabled by default on most modern EC2 instance
SR-IOV - NIC is virtualization-aware
No charge - available on most EC2 types
Higher IO & Lower Host CPU usage
More bandwidth
Higher PPS (packers per second)
Consistent Low latency
18
Q

EBS Optimized instances

A

Optimization is either on or off
EBS = Block storage over the network
EBS optimized instance means it has dedicated capacity for EBS
Most instances support it and have enabled by default