## Notes
Key factors to consider when designing a system
- [[#Memory Capacity]]
- Network considerations, bottlenecks
- Simplicity
- [[#Scalability]]
- [[#Horizontal Scaling]]
- [[#Vertical Scaling]]
## Memory Capacity
How much RAM or disk space would a given approach consume? Can this be reduced? What alternatives can we consider?
## Scalability
Comes in two types. Vertical scaling is more simple, but reaches a bottleneck. Horizontal scaling is more fault tolerant.
### Horizontal Scaling
Involves adding more machines/instances in parallel to existing machines/instances.
### Vertical Scaling
Involves adding more capacity to existing machines.
## Performance Optimization
- **Load balancing**: distribute incoming traffic to multiple servers/instances so that no one server/instance is bottlenecked
- **Caching**: store copies of data in faster-access memory; reduces query times for commonly retrieve data
- **Database indexing**: speeds up certain types of reads; may slow down other types of reads
## References
- [Scalability and Performance in System Designs - CodeSignal](https://learn.codesignal.com/preview/lessons/2858/ensuring-scalability-and-performance-in-system-designs)