Practical System Design. SLO Watch

get_product_page

  1. def get_product_page(user_id, product_id):
  2. product = catalog_service.fetch(product_id)
  3. recs = recommendation_service.get(user_id, product_id)
  4. return build_response(product, recs)
  5. exposure_pct =
  6. flag_off_for_new =
  7. pool = 40
  8. query_ms = 70
  1. CatalogNo pool slot on Product Page.
  2. Recommendation400 lookups/s. Pool 70%.
  3. AcquirePending 0. Headroom 100% of the 600 ms tail.

Lookups and acquire headroom

The first 16 seconds are 400 lookups a second. After that the burst is about 1.7 times that rate. The upper line is lookups. The lower band is how far acquire wait is from the 600 ms incident.

Headroom 100% · pool 20%

estimateburst0s48s
ArrivalsClear of the 600 ms tail

Live metrics

ReadyRecommendation Service allows 40 connections. At about 400 lookups a second with a 70 ms hold, roughly 28 are in use. A burst of about 1.7 times that rate is about to fill the spare connections.
Metric definitions
MetricValueWhat it means
Pool70% of 40Busy connections divided by 40. Utilization stays at or under 100 percent. Extra lookups wait.
Query70 msThe database hold. It stays here while acquire time moves.
Pending0Lookups waiting for a connection.
Lookups400/sRecommendation calls still being attempted.
Acquire headroom100%100 percent is no queue. 0 percent is the 600 ms acquire tail.
70%
0
100%
100%