Link to video
Resilience - Making system safe from failures.
Explains various system design concepts through pizza parlour. Suppose you have a pizza parlour where you take order and deliver pizza.
Scenario 1 : Suddenly, the number of orders you are getting increases. How will you ensure your shop runs properly ?
- Optimize the processes and increase throughput using the same resources. This is analogous to vertical scaling.
- Prepare some material of pizza before hand during non-peak hours. This is analogous to preprocessing and running cron jobs.
- Keep backups by hiring more chefs and avoid single point of failures.
- Add more pizza machines. Analogous to horizintal scaling.
Scenario 2 : Expand pizza parlour
- Suppose you have many chefs, how will you decide which chef takes which order. Assign chef 1 for garlic bread, ched 2 for pizza etc. This is analogous to Microservic architecture.
- Now, what if there is a power outage ? Open one more outlet. Analogous to distributed system.
- Distribute load to various parlours. There is a system which does this. This can be thought of as a load balancer.
- Decoupling the system - separating out concerns so that the system is more flexible.
- Logging to check for error later.
- Extensible system.