Explain the difference between horizontal and vertical scaling.
✅ Answer:
Vertical scaling means increasing the resources of a single machine, such as adding more CPU or memory. It is simpler to implement but has hardware limits and can become a single point of failure.
Horizontal scaling means adding more machines and distributing the load across them. It provides better fault tolerance and scalability but introduces additional complexity such as load balancing, data consistency, and distributed coordination.
Modern high scale systems typically favor horizontal scaling because it supports elastic growth and higher availability.