Even though this is a fictitious scenario, it can very well happen to any business. In e-commerce, we have always experienced these kinds of things in real life, especially on special occasions such as Christmas and Black Friday. All in all, they point toward one major significant characteristic—the scalability of the system. Scalability is one of the most important non-functional requirements of any mission-critical system. Serving a couple of users with hundreds of transactions is not the same as serving millions of users with several million transactions. In this chapter, we will discuss scalability in general. We'll also discuss how to scale microservices individually, what to consider when we design them, and how to avoid cascading failure using different patterns. By the end of this chapter, you will have learned about:
- Horizontal scaling
- Vertical scaling
- The Scale Cube model of scalability
- Scaling infrastructure using Azure scale sets and Docker Swarm
- Scaling a service design through data model caching and response caching
- The circuit breaker pattern
- Service discovery