Chapter 16. Service Tiers

Working with large, complex applications with many services can cause availability issues. A failure of a single service can cause services that depend on it to fail. This can cause a cascade effect that results in your entire application failing. This is especially egregious when the service that failed is not a mission-critical service, but it caused mission-critical services to fail.

Application Complexity

As illustrated in Figure 16-1, sometimes, the smallest and least significant of services can fail.

A single service failure.
Figure 16-1. A single service failure…

This can cause your entire application to go down, as illustrated in Figure 16-2.

Can cause a cascade of service failures.
Figure 16-2. ...can cause a cascade failure

There are many ways to prevent dependent services from failing, and we discuss many of these in Chapter 13. However, adding resiliency between services also adds complexity and cost, and sometimes it is not needed. Looking at Figure 16-3, what happens if Service D is not critical to the running of Service A? Why should Service A fail simply because Service D has failed?

What if a dependency is not critical?
Figure 16-3. What if Service D is not critical?

How do you know when a service dependency link is critical and ...

Get Architecting for Scale now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.