April 13, 2026 · 5 min read

Relay vs Laravel Reverb: A Real Performance Benchmark

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

Note on testing conditions: Reverb ran on loopback (same machine as k6) while Relay ran over the network on a separate server. This gave Reverb a latency advantage. Despite this, Relay won on every resource metric.

Results

Metric Relay (Go) Laravel Reverb (PHP)
Process memory at 1,000 connections~38 MB~63 MB
CPU usage at peak~18%~95%
Server load average0.622.95
Total server RAM used700 MB962 MB
Connections sustained1,0001,000

What the Numbers Mean

Both servers handled 1,000 connections. That's the baseline. But look at what it cost each of them to get there.

Reverb hit 95% CPU. On the same hardware that Relay used at 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.

The memory story is similar. Reverb consumed 63MB for the WebSocket process alone, plus the rest of the server pushed total RAM to 962MB — 26% of the available 3.72GB. Relay's process used 38MB, and the total server footprint was 700MB including Nginx, MySQL, and the Laravel app all running on the same box.

Go's goroutine model is the reason. Each WebSocket connection in Relay is handled by a goroutine — lightweight, cheap to schedule, and independently managed. PHP's event loop in Reverb is fundamentally different. It works, but it pays a higher price per connection.

The Honest Caveat

We want to be clear about what this benchmark does and does not show. 1,000 connections is the lower end of where these differences become meaningful. At 5,000 or 10,000 connections, we expect the gap to widen significantly — Reverb would likely need a larger server or horizontal scaling. Relay would continue on the same $5 box.

We also want to be fair to Reverb. It is a well-built product, officially maintained by the Laravel team, and the right choice if you want first-party support and are running a pure Laravel stack. This benchmark is not a reason to dismiss it — it is data to help you make an informed decision.

When to Choose Each

Choose Reverb if:

Choose Relay if:

Relay Cloud is a managed WebSocket hosting platform built on the open source Relay server. Free tier available. No credit card required.

Try Relay Cloud free Read the docs