We built Relay because we believed a WebSocket server written in Go would handle real-world connection loads more efficiently than one running in PHP. We wanted to find out by how much. So we ran a real benchmark. Here's exactly what we did, what we found, and what it means.
Test Setup
- Benchmark runner: Hetzner CAX11 (4GB RAM, ARM64, Ubuntu 24.04)
- Relay server: Hetzner CX23 — separate machine, tested over the network
- Reverb server: Running locally on the benchmark box (loopback — an advantage for Reverb)
- Load testing tool: k6 v0.55.0
- Test: Ramp from 0 to 1,000 concurrent WebSocket connections over 5 minutes, hold at 1,000 for 60 seconds
Results at 1,000 Concurrent Connections
| Metric | Relay (Go) | Laravel Reverb (PHP) |
|---|---|---|
| Process memory | ~38 MB | ~63 MB |
| CPU at peak | ~18% | ~95% |
| Server load average | 0.62 | 2.95 |
| Total server RAM | 700 MB | 962 MB |
What the Numbers Mean
Reverb hit 95% CPU. Relay hit 18%. That means Reverb is near its ceiling at 1,000 connections on a $5 server. Relay is barely warming up.
The headroom difference is what matters in production. When traffic spikes, Relay absorbs it. Reverb starts dropping connections.
Go's goroutine model is the reason. Each WebSocket connection in Relay is handled by a goroutine — lightweight, cheap to schedule, independently managed. PHP's event loop works, but it pays a higher price per connection.
The Honest Caveat
Reverb ran on loopback while Relay ran over the network — a latency advantage for Reverb. Despite this, Relay won on every resource metric.
Reverb is a well-built product with first-party Laravel support. If you're running a pure Laravel monolith and want Taylor Otwell's name behind your WebSocket server, Reverb is a solid choice.
When to Choose Relay
- Polyglot stack (Next.js, Rails, Django, Node — not just Laravel)
- You want a managed cloud option without vendor lock-in
- You want a live Channel Inspector in your dashboard
- Self-host free forever, optionally move to managed hosting with zero code changes
- Better resource efficiency at scale
Try It
Relay is open source (MIT) and free to self-host forever:
👉 github.com/DarkNautica/Relay
Relay Cloud is the optional managed tier with a free hobby plan:
👉 relaycloud.dev
Laravel package:
composer require darknautica/relay-cloud-laravel
Originally published at relaycloud.dev/blog/relay-vs-reverb-benchmark