Throughput is the amount of work a system completes per unit of time. A bottleneck—the slowest part of the system—can limit overall throughput, so improving performance often begins by finding where flow slows down. section 8.2
When throughput reaches a performance limit, consider two scaling directions:
- Horizontal scaling adds instances or processes, but may require distributed-system changes and safe handling of shared outputs. section 8.2
- Vertical scaling adds resources such as CPU cores or memory to an existing machine, provided the application can use them. section 8.2
Running multiple processes
Running `python main.py & python main.py` starts two instances, but both can overwrite the same output. More processes increase capacity only when the service handles their outputs correctly. section 8.2



















