Every synchronous hop adds a round trip to the request, so a chain of calls is as slow as its sum and only as available as the product of its parts; call independent services in parallel and move work the user need not wait for onto a queue.
Learn the idea first
You tap Place order. Before it can answer, the back end must charge your card, reserve the stock and send a confirmation email. It starts split into services; switch Split into services off to see one app do the same work with in-process function calls. The slider sets the round trip for one call between services inside the data centre (5 ms stands for the wire plus TLS, a proxy and JSON encoding). The phone's trip over the internet stays at 30 ms each way. Timings are an illustrative model.
Your phone
checkout screen
Order service
or the whole app
Payment service
talks to the bank
Inventory service
stock per warehouse
service or its queue
Swipe the diagram sideways to see every column →
Where the time goes
464 ms total
You tap Place order. Before it can answer, the back end must charge your card, reserve the stock and send a confirmation email. It starts split into services; switch Split into services off to see one app do the same work with in-process function calls. The slider sets the round trip for one call between services inside the data centre (5 ms stands for the wire plus TLS, a proxy and JSON encoding). The phone's trip over the internet stays at 30 ms each way. Timings are an illustrative model.
Illustrative timings. Real numbers vary with distance, network quality and server load.