Summary: https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/20260630
Infrastructure - Some Key Concepts
Ref: https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/20055858 and https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/29102306
- Resilience: ability of a system to self-/auto-heal from failures
- 💡 AZ-resilient → data replication within an AZ, if some HW fails, system can still operate as long as the failure is not in the whole AZ
- 💡 regionally-resilient → data replication within a region, can withstand a whole AZ failing
- High Availability (HA): a HA system optimizes its uptime/availability (much higher than in a normal system) → can recover fast from failures, usually in an automated way
- ‼️ There can still be downtime/unavailability while recovering! But the outage will be much shorter than without HA!
- Related to resilience → resilience refers to the ability to auto-heal, HA refers to the ability to auto-heal fast, within a certain amount of time
- Fault Tolerance (FT): a FT system continues operating despite failures in some components, without any downtime (even if in the process of auto-healing)
- ‼️ NO DOWNTIME allowed!! → usually involves installing redundant HW
- Scalability: ability to adjust infrastructure to lower or higher loads on the system
- Overprovisioning: too much capacity & too little load → wasted capacity, wasted $$$
- Underprovisioning: too little capacity & too much load → bad performance, bad UX
- Scalability intends to ideally never under- or overprovision → increase capacity when load increases, decrease capacity when load decreases
- Types:
- Vertical scaling: increasing/decreasing size & capacity of a single server
- Scale UP/DOWN (increase/decrease)
- Easy to implement in non-distributed systems, but can be very expensive, also there's limits
- Horizontal scaling: launching/terminating many identical servers (clones)
- Scale OUT/IN (increase/decrease)
- Generally cheaper, works great in distributed systems, but more complicated configuration needed (servers must be stateless, needs Auto-Scaling Group…)
- Enables resilience/HA easily → if a server fails, there are others already, or more can be created automatically to replace the failed one
- Elasticity: automate scalability → auto increase/decrease infrastructure/capacity according to load → auto-scaling, cloud-friendly (pay-per use, match demand, optimize costs)
- Agility: provision/terminate resources (e.g. servers) very fast, usually a click away → allows for quick experimentation of infrastructure
- âť—Â NOT related to scalability!
- Right-sizing: match instance types & sizes to best fit your workload when it comes to performance & cost
- 💡 Another way of saying to never underprovision or overprovision
- ‼️ Choosing the most powerful instance type isn't usually the right choice! → That's usually overprovisioning, and cloud is elastic and can scale on demand
- In traditional IT setups, overprovisioning was common (getting big and powerful servers “just in case”) → the paradigm shift is to “right-size in the cloud”
- Important to right-size…:
- Before a migration into the cloud (don't copy your overprovisioned physical servers)
- Continuously after the cloud onboarding process (requirements change over time → use autoscaling)
Elastic Load Balancing (ELB)
Ref: https://www.udemy.com/course/aws-certified-cloud-practitioner-new/learn/lecture/20055864
- đź”§Â Load Balancer (LB) = server that distributes traffic across backend EC2 instances
- Single DNS endpoint for your backend (instead of one endpoint for each instance)
- Handle failures and scaling of backend instances transparently to clients
- Can be Multi-AZ (instances in different subnets and AZs) → HA across AZs
- Diagram
- Supports health checks → only direct traffic to an instance if the instance is healthy
- Types of LBs
- Classic (CLB) → Legacy, do NOT use, migrate from it
- Application (ALB) → Layer 7 (only HTTP & HTTPS)
- Network (NLB) → Layer 4 (TCP, UDP… Very high performance)
- Gateway (GWLB) → Layer 3 (GENEVE protocol on IP packets, for security)