Direct calls vs backend for frontend
With direct calls, each phone calls four services and gets four responses over the cell link. A backend for frontend joins them into one smaller response. With 1,000 phones on a 120 Mbps cell, direct calls fill the link: 90 percent of requests fail. One backend for frontend gives p99 79 ms.
Calls per page: 20 · 18% of pages wait 2.0 s
100 images/s · 1,600 of 1,000 Mbps · it does not fit
Case 1
1,000 phones share a 120 Mbps cell and refresh once a second. Each screen needs 20 KB from each of four services. p99 must stay below 140 ms. The budget is 46 USD/mo.
| Measure | Goal | Each phone calls 4 services | One backend for frontend |
|---|---|---|---|
| p99 latency | under 140 ms | 10.1 s Fail | 79 ms Pass |
| Error rate | under 0.1% | 89.6% Fail | 0% Pass |
| Monthly cost | 32 USD/mo | 40 USD/mo |