What is the difference between horizontal scaling and vertical scaling in AWS?
Scaling is how a system grows to handle more load. Two strategies — vertical (scale up) and horizontal (scale out).
Vertical scaling — make a single resource bigger. In AWS: change an EC2 instance type (e.g.,
m5.large → m5.4xlarge) or RDS class. Simple, but requires downtime (stop/start) and hits a ceiling at the largest instance.Horizontal scaling — add more identical resources. In AWS:
Auto Scaling Groupsadd EC2 behind an ALB, RDS Read Replicas, DynamoDB partitions. No ceiling, no downtime to scale, but requires stateless app design or shared state in caches/DBs.
Cloud preference: horizontal scaling is the AWS default — it's elastic, resilient (multiple instances survive AZ failure), and cheaper at scale with Spot.
Cloud-native = horizontal. Mention Auto Scaling Groups + ALB and stateless apps; that's the senior-engineer phrasing.