Ref: https://learn.cantrill.io/courses/1820301/lectures/41301316 and https://learn.cantrill.io/courses/1820301/lectures/41301317
Selecting an EC2 Instance Type
- Select a specific type = select family, generation, size & extra capabilities
- Granular control over resource configuration
- Pick correct type for a specific workload → well-performing system
- Pick wrong type → bad customer experience
- No fits-all solution & often several different types might fit same requirements
- ❗but it's important not to select the wrong type!
- Selection of instance type influences:
- Amount of raw resources
- CPU, memory, local storage type, local storage capacity
- Resource ratios
- e.g a compute instance gives more CPU & less memory for the same cost
- Storage & Data NW BW
- e.g. EBS volume might need certain BW (if instance does not provide enough → instance is the limiting factor)
- System Architecture
- e.g. ARM architecture, x86 architecture
- System Vendor
- e.g. Intel CPUs, AMD CPUs
- Additional features & capabilities
- e.g. special types of CPUs → GPUs, FPGAs…
- 💡 Instances are very customizable compute HW
EC2 Instance Categories
💡 Categories group similar instance types together based on their purpose
- General Purpose
- Diverse workloads
- Equal resource ratio
- Default
- Start off with general purpose instances, choose others when specific requirements come
- Common general purpose types:
- A1, M6g → ARM processor, efficient (small intances with low costs)
- T3, T3a → Burst Pool (low CPU usage with occasional peaks)
- M5, M5a, M5n → Steady state workload
- Compute Optimized
- Access to highest-performing CPUs
- Ratio: +CPU, -memory
- Scenarios: media processing, High Performance Computing (HPC), scientific modeling, gaming, Machine Learning (ML)…
- Memory Optimized
- Process large in-memory datasets
- Ratio: -CPU, +memory
- Scenarios: in-memory caching (e.g. Redis, ElastiCache), some DB workloads…
- Accelerated Computing
- Have extra features & capabilities
- Scenarios: high scale parallel processing or modeling (HW GPU), custom programmable HW like Field Programmable Gate Arrays (FPGAs)…
- Storage Optimized
- Large amounts of super-fast local storage
- Scenarios: high sequential transfer rates & massive amounts of IO operations per second (sequential & random IO), scale-out transactional DBs, Data Warehousing (DWH) - e.g. Amazon Redshift, Elasticsearch, data analytics workloads…
💡 Mnemonic: Great Pirates Conquer Oceans, Master Onboard Acrobatics, Collect Stolen Opulence
Decoding EC2 Types
🔧 The whole instance type unambiguously & precisely identifies what instance we need