Layer 3 · Go deeper · 8 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
How would GitHub’s limits price a 100 × 100 × 50 nested query?
Build-up · 5 steps
One order screen, three ways
The same screen, fetched by plain REST, by GraphQL and by a BFF over gRPC. Count the trips the phone pays for.
Step 1 of 5
Three services, one screen
The screen shows status, items, the restaurant and the rider. That data lives in Orders, Restaurants and Delivery, behind a 4G link costing about 100 ms a trip.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Restaurant POS and ERP systems need to read and update your orders. What API do you give partners?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Your order-history screen asks for 20 orders and each one’s restaurant. You count 21 backend calls per request. What do you change?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Every phone fetches the same restaurant page through POST /graphql, and your CDN caches none of it. What do you do?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Your services span several languages and high call rates. A teammate wants GraphQL between them too, for consistency. What do you say?”
Your move. Pick an approach:
Build-up · 5 steps
Follow one deadline down the chain
The BFF gives the order screen 800 ms. Watch the budget shrink at each hop, then stop every hop at once.
Step 1 of 5
Set one budget at the edge
The BFF sets the deadline from the user’s patience: now + 800 ms. gRPC sets none by default, so you always set one.