Boson AI · Modal overflow

Elastic validation — scale-out/in, affinity, GPU matrix

← Back to plan & tracker

Elastic validation — real engineering test results (2026-07-06/07)

Architecture: session-affinity gateway (milestones/elastic_avatar.py) — sessions pinned to replicas via modal.Dict, spill-over policy (probe replica k+1 only when 0..k busy), demand-driven wake, fully-passive status. Replicas = independently labeled Modal web endpoints running the hardened v1.0.0 server. Burst harness: milestones/elastic_burst_test.py (real renders only).

Proven by execution

Claim Evidence
Scale-out from cold under overload round 1: r2 woke on demand, served 5 real sessions (14 s renders)
Correctness under 6× overload round 2 (post-fixes): 40/40 PASS, zero gate-race errors
Warm-fleet distribution final: 9/9 PASS split {r0:5, r2:4} (elastic_burst_final.json)
Scale-in to zero observed hands-off at 303 s after idle (300 s window)
Session affinity ~100 sessions, zero cross-replica errors
No spurious scale-out light load (round 0): 30/30 on r0, cold replicas never woken
Self-healing r0 died mid-burst, watchdog+min_containers recovered it
GPU capacity resilience 4 types validated by real render (gpu_matrix_results.json); deployed: prod [A100-80GB,H100,L40S,A100-40GB], overflow [L40S,A100-40GB,A100-80GB,H100] (cheapest-first)

Bugs found by the tests (all fixed & committed)

  1. Warmup-gate race (brief accepts_new_session:true before Phase-B) → sustained-true 45 s gate
  2. Gateway wake held one request 40 min → blocked scale-in → short repeated pokes
  3. Watchdog too aggressive under load → 20 s × 8
  4. Real A100-80GB capacity shortage mid-test → GPU fallback lists (the shortage actually hit prod)
  5. Observer effect: HTTP status probes reset replicas' idle clocks → gw/status passive by default
  6. Single aborted wake poke doesn't start a container (Modal cancels) → sustained pokes

Honest limits