wtf( )unctionsystem design, drawn
← all problemsArchitectureEasy

Five services, one availability

The monolith was split into five services. Each deploys independently, each has its own team, and each is available 99.9% of the time on its own.

Rendering one page calls all of them, in a chain, synchronously. The page is up only when every link is, so its availability is the product of theirs — about 99.5%. Each service is down for roughly forty minutes a month. The page is down for about three and a half hours.

The split bought independent deploys and sold shared uptime.

Break the chain so that one link going down stops taking the page with it.
Components — tap one, then tap a slot on the diagram
!The reviews service has been down for ten minutes. So has the entire page.

Outside every boundary: Service B (99.9%), The arithmetic (0.999^5 = 99.5%), The page (99.5% together; FAILED: unavailable), Page request, Service C (reviews; FAILED: down), Service A (99.9%), an empty slot for the when C cannot answer Connections: Page request calls Service A (step 1) Service A calls Service B (step 2) Service B calls Service C (step 3) Service C calls The page — all four must answer (step 4) when C cannot answer controls The page (step 5)

Service B99.9%
The arithmetic0.999^5 = 99.5%
The page99.5% togetherunavailable
Page request
Service Creviewsdown
Service A99.9%