Pravda must limit concurrent browser captures so incoming traffic cannot exhaust browser, memory, or CPU capacity.
Add per-instance admission control around snapshot creation.
Behavior
Configure a maximum number of concurrent captures.
Queue excess requests up to a bounded limit.
Reject requests when the queue is full.
Apply a maximum queue wait time.
Release capacity when a capture succeeds, fails, times out, or is cancelled.
Expose active captures and queue depth through structured logs and metrics.
Questions
Should queued requests remain open or receive 429 immediately?
Should concurrency be limited per Pravda instance, browser process, or both?
How many concurrent contexts can one playwright run-server process support reliably?
Should limits be fixed configuration or derived from browser-worker capacity?
Does the deployment topology selected in Define the Pravda Kubernetes deployment model #7 require different admission behavior?
Acceptance criteria
Concurrent captures never exceed the configured limit.
Queue depth and wait time are bounded.
Saturation produces a documented HTTP response.
Failed and cancelled captures release capacity.
Tests cover execution limits, queue saturation, timeout, and cancellation.
A small load test establishes an initial concurrency setting for the deployment model.
Pravda must limit concurrent browser captures so incoming traffic cannot exhaust browser, memory, or CPU capacity.
Add per-instance admission control around snapshot creation.
Behavior
Questions
429immediately?playwright run-serverprocess support reliably?Acceptance criteria