~/talk

Adaptive Concurrency Control for Mixed Analytical Workloads

Talkat SREcon23 Americas · 2023-03-21..03-23· [databases]
slides:none on file

Klaviyo’s real-time Query Service hits intermittent waves of timeouts despite adequate capacity; investigation shows queuing and variable query latency are the root cause. Implementation adds Python gRPC/Envoy-level per-server in-flight limits, samples P95 latency over rolling windows and runs an AIMD (additive increase, multiplicative decrease) controller to raise or sharply back off the concurrency ceiling, and enforces partitioned quotas so API, UI and reports keep reserved slots. The system leverages ClickHouse, client-side opaque retries, and turns timeout walls into short latency spikes while improving cluster utilization.

AI-written summary · about

  1. 0:00Start
  2. 7:28Metrics Service Request Flow - gRPC Server
  3. 9:20Healthy State - Queuing Balanced with Processing
  4. 15:54Load Shedding at the Cluster Level
  5. 18:31Load Shedding and Concurrency Control
  6. 20:25Adaptive Concurrency Control - Measuring Latency
  7. 21:22Adaptive Concurrency Control - Record, Recalculate, React
  8. 23:11Adaptive Concurrency Control - AIMD Algorithm
  9. 25:03Adaptive Concurrency Control - Partition Limits
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.