Compute & Load Balancing Flashcards
EC2 R Instance Types
Applications that need a lot of RAM (e.g in memory cache)
EC2 C Instance Types
Applications that need good CPU (e.g databases or compute)
EC2 M Instance Types
Applications that are balanced (e.g general or web apps)
EC2 I Instance Types
Applications that need good local I/O (e.g databases)
EC2 G Instance Types
Applcations that need a GPU (e.g video rendering or machine learning)
EC2 T2/T3 Instance Types
Burstable instances
EC2 Cluster Placement Strategy
Clusters instances into a low latency group in a single AZ
* Pro: Low latency
* Con: If the rack fails, all instances fail
EC2 Spread Placement Strategy
Spreads instances across underlying hardware
* Pro: span across AZs, reduce risk of simultaneous failure
* Con: Limited to 7 instances per group per AZ
EC2 Partition Placement Strategy
Spreads instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups in different partitions
How to move instances between placement groups
- Stop the instance
- Use the CLI to modify the placement
- Start the instance
EC2 Instance Launch Type
- On demand: short workload, predictable pricing, reliable
- Spot: short workload, cheap, can lose instances
- Reserved: minimum 1 year
- Dedicated: no other customers will share hardware
- Dedicated host: book an entire physical server and control instance placement
EC2 Graviton
Family of processors designed to deliver the best price performance for your cloud workloads
EC2 Enhanced Networking
Higher bandwidth, higher pps, lower latency
* Elastic Network Adapter (ENA) up to 100 Gbps
* Legacy: Intel 82599 VF
Elastic Fabric Adapter
Improved Elastic Network Adapter, only works for Linux. Great for inter node communication, tightly coupled workloads.
Auto Scaling Groups
Dynamic Scaling Policies
- Target tracking scaling: Increase and decrease the capacity based on a CloudWatch metric and a target value
- Simple step scaling: Increase and decrease capacity based on a set of scaling adjustments
- Scheduled actions
Auto Scaling Groups
Predictive Scaling
Continously forecast load and schedule scaling ahead
EC2 Spot Instances discount
Up to 90% compared to On-Demand
Spot Fleets
Set of Spot Instances and On-Demand Instances.
- Define launch pools (instance type, OS, AZ)
- Can have multiple pools to choose from
Strategies to allocate Spot Instance
- lowestPrice
- diversified distributed across all pools
- capacityOptimized
- priceCapacityOptimized (recommended) pools with highest capacity, then select the lowest price
ECS - ALB Integration
Dynamic Port Mapping so multiple instances of the same task can be deployed on the same EC2 instance
Note: host and awsvpc networking do not support Dynamic Port Mapping
ECS networking
- none: don’t have external connectivity and port mappings can’t be specified
- bridge: uses Docker’s built-in virtual network
- host: maps container ports directly to the ENI of the instance that hosts the task. A port on a host can’t be used by multiple tasks.
- awsvpc: the task is allocated an elastic network interface (default for Fargate)
Fargate Spot Instances
Specify minimum number of regular tasks that should run at all times and then add tasks on Fargate Spot to improve service performance in a cost-efficient way.
ECR Image Scanning
- Manual scan or scan on push
- Basic scanning (common CVE)
- Enhanced scanning: Leverages Inspector
Data Volumes EKS
Specify StorageClass manifest, leverages a Container Storage Interface compliant.
Support with EBS, EFS, and FSx.
AWS App Runner
Fully managed service that builds and deploy web applications and APIs