Ref: https://learn.cantrill.io/courses/1820301/lectures/41301315
EC2 architecture

EC2 Instances
- đź”§Â An instance is a VM (OS + logical resources)
- Characterized by its type → Properties:
- Family
- Generation
- Size
- Extra capabilities
EC2 Hosts
- đź”§Â Physical HW where instances run
- CPU, memory, storage, networking
- Managed by AWS
- Types:
- Shared Host: shared across different AWS customers
- No ownership of HW
- Billed for how long instances & their allocated resources run
- Instances still isolated from each other → no interaction with instances from different customers, no awareness of what other stuff is hosted
- Default
- Dedicated Host: dedicated to a single AWS account
- No sharing with other customers
- Billed for the entire host (NOT for the instances you're running in it)
- A host is of a certain year, processor type, memory type, storage type, storage configuration
- Generally contains instances of same type but different sizes → two instances of different types will likely end up in a different host
- Instances of different types & generations can still share the same host
- An instance stays on its host until:
- Host fails
- Host is taken into maintenance by AWS
- Instance is firstly stopped, and then started again
- ‼️ Instances stay on their host on simple restarts → NOT THE SAME!
EC2 Resiliency
- ‼️ EC2 has AZ resiliency - very reliant on the AZ
- Everything runs in one AZ and is locked in that AZ: HW, NW, storage…
- If AZ fails → host fails → its instances fail
- âť—Â Actually a great feature/advantage when designing HA systems:
- 👍 AZ isolation → Failure blast radius contained within one AZ
- 👍 Load balancing between AZs handy for HA
- âť—Â Instances can NOT natively move between AZs
- Even if reallocated to a new host, that host will be in the same AZ
- Migration to another AZ = create a copy of the instance in a different AZ
- EBS volumes or NWs from one AZ can NOT be used in an instance in another AZ!
EC2 Storage