Scaling Vertical vs Horizontal
- Vertical Scaling(Scaling Up) - Buying a bigger machine
- Horizontal Scaling (Scaling Out) - Adding more machines
| HORIZONTAL | VERTICAL |
|---|---|
| Load balancing Required | NA |
| Resilient | Single point of failure |
| RPC (Slow Network Calls) | IPC - fast calls |
| Data inconsistency | Consistent |
| Scales well as users increases | Hardware limit |
-
Horizontal Scaling of DB is known as Sharding
Exposing the code/algorithm sitting on server via an API through a protocol
Sending the response back to the user