Browser pool: pre-warm Chromium instances to eliminate cold-start latency on search #47
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Each
/api/searchrequest cold-starts a new Chromium instance to bypass Kasada. Under load this means 10-30s of browser startup before any eBay content is fetched. Spike #5 showed p50 of 29s on search — startup overhead is the dominant cost.Proposed Fix
Maintain a pool of N pre-warmed Chromium/Playwright browser contexts (suggested N=2-3). Each search request borrows a context from the pool, navigates and scrapes, then returns the context (not closes it).
BROWSER_POOL_SIZEenv var (default 2)Expected Impact
Notes