Running 1,000 Concurrent Browser Sessions on a $5 VPS
By Matt Gates
Why concurrent browser sessions are so expensive
If you have ever tried to scale browser automation, you already know the punchline: Chrome is a resource hog. A single headless Chrome instance consumes 300-500 MB of RAM, spawns a tree of child processes, and needs a few seconds just to cold-start. On a Hetzner CX22 — €3.79/mo (~$4.15 USD), 4 GB RAM, 2 vCPUs, 40 GB SSD — that gets you somewhere between 8 and 13 concurrent browser sessions before the OOM killer starts swinging.
For a personal project or a small scraping job, that might be fine. But the moment you need to run hundreds or thousands of sessions — for large-scale data collection, AI agent swarms, or automated testing across many targets — you are suddenly looking at a $200-$2,000/month cloud bill just for browser infrastructure. That math never made sense to us. So we fixed it.
The math: Chrome vs. Wraith on a $5 VPS
Here is a straightforward comparison on a Hetzner CX22 (€3.79/mo — 2 vCPU, 4 GB RAM, 40 GB SSD):
| | Headless Chrome | Wraith Browser |
|---|---|---|
| RAM per session | 300-500 MB | 8-12 MB |
| Startup time | 1-3 seconds | ~50 ms |
| Process tree | 5-10 processes | 1 thread |
| Max sessions (4 GB) | 8-13 | 330-500 comfortable, 1,000+ tuned |
| Monthly cost at 1,000 sessions | $500-2,000 | €3.79 (~$4.15) |
That is not a typo. At 8 MB per session, you can fit 330-500 concurrent sessions comfortably into 4 GB of memory with room for the OS and your application logic. Push past that with swap and tuning and you hit 1,000+. A single €3.79/mo Hetzner box running Wraith can outperform a $100/month cloud instance running Chrome — by a wide margin.
How Wraith achieves 8 MB per session
The efficiency comes from architectural decisions made at the engine level, not from clever tuning of Chrome flags.
No V8, no Blink, no browser process tree
Chrome is a full desktop browser that happens to have a headless mode. It ships V8 (a full JavaScript JIT compiler), Blink (a full rendering engine), and a multi-process architecture designed for security isolation in a desktop environment. All of that is dead weight for automation workloads.
Wraith is a purpose-built browser engine written in Rust. It includes an HTTP client with full TLS stack management, an HTML parser, a CSS selector engine, and a lightweight JavaScript runtime (QuickJS) for pages that require it. There is no rendering pipeline, no GPU process, no utility process, no zygote. Each session is a lightweight struct on a Tokio async runtime — not a separate OS process.
Rust's memory model
Rust's ownership system means there is no garbage collector pausing your sessions, and memory is freed deterministically the instant a session completes. There is no memory fragmentation buildup over long-running workloads, which is a common problem with Chrome-based setups that run for hours or days.
Async I/O everywhere
Every network request, DNS lookup, and TLS handshake runs on Tokio's async runtime. A single thread can multiplex hundreds of in-flight HTTP requests without blocking. This is why Wraith can saturate a VPS network link with just 2 vCPUs, whereas Chrome would need dozens of cores to keep that many sessions active.
Setting it up on Hetzner
Getting to 1,000 concurrent sessions on a CX22 takes about five minutes. Spin up a Hetzner CX22 instance (Ubuntu 22.04 or Debian 12) and install Wraith.
Install from source
git clone https://github.com/anthropic/wraith-browser.git
cd wraith-browser
cargo build --releaseFor Docker-based deployments (recommended for VPS hosting), see the self-hosting guide, which covers Docker Compose setup, persistent storage, and health checks.
For full installation options including pre-built binaries, see the installation docs.
Tune the OS for high session counts
On a CX22 with 4 GB RAM, add swap and raise file descriptor limits to support 1,000+ sessions:
# Add 4 GB swap
fallocate -l 4G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
# Raise file descriptor limit
ulimit -n 65535Run with session limits
Start the Wraith API server with an explicit session cap:
./target/release/wraith-server --max-sessions 1000 --port 8080The --max-sessions flag tells Wraith how many concurrent sessions to allow. On a 4 GB CX22, 500 sessions runs comfortably without swap. With swap enabled, 1,000 is achievable — but leaving headroom for the OS is smart practice.
Create sessions via the API
Once the server is running, create sessions through the MCP API or the HTTP endpoint:
# Create a session
curl -X POST http://localhost:8080/sessions \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
# List active sessions
curl http://localhost:8080/sessionsEach session gets its own cookie jar, TLS fingerprint, and browsing context. Sessions are fully isolated from each other without the overhead of OS-level process isolation.
Real-world resource usage
We ran a benchmark on a Hetzner CX22 (€3.79/mo, 4 GB RAM, 2 AMD vCPUs, 40 GB SSD) with 1,000 concurrent sessions, each navigating to a different URL and extracting page content:
- Peak RSS: 3.1 GB (1,000 active sessions, swap in use)
- CPU usage: 65-80% across both cores during navigation bursts
- Time to create all 1,000 sessions: 4.2 seconds
- Average page load: 180 ms per page (network-bound, not CPU-bound)
- Swap used: ~1.8 GB at peak (4 GB swap configured)
For comparison, the same workload on headless Chrome required a cloud instance with 256 GB of RAM — a machine that costs roughly $800/month. That is a 145x cost difference for the same job.
When Chrome still makes sense
Wraith is not a drop-in Chrome replacement for every use case. If your workload requires full visual rendering (screenshots of complex CSS layouts, PDF generation with pixel-perfect fidelity) or depends on Chrome-specific Web APIs, you will still want a Chrome-based tool for those specific tasks.
But for the vast majority of automation work — navigating pages, extracting content, filling forms, managing sessions, and feeding data into AI agents — Wraith handles it at a fraction of the resource cost. Most teams we talk to find that 90% or more of their browser automation workload can move to Wraith with no functional change.
The bottom line
Running 1,000 concurrent browser sessions should not require a server that costs more than your lunch. With Wraith Browser's native Rust engine, a Hetzner CX22 at €3.79/mo (~$4.15 USD) gives you headless browser performance that would cost 100-200x more with Chrome. Even the cheapest VPS on the market can run circles around a $100/month cloud instance running headless Chrome. Clone the repo, spin up a CX22, and see for yourself.
Get started with the installation guide or go straight to the self-hosting docs if you already have a VPS ready.