Skip to contentNew book: Designing Human-Centered AI InterfacesGet it
Abhishek Anand

Engineering//7 min read

Laravel Rust is here. What does the 18× benchmark measure?

Abhishek Anand

Abhishek Anand

UX Engineer at Google

Everything that can be written in Rust will eventually be written in Rust. Or at least it feels that way this week.

Laravel shipped the first beta of Laravel Rust on December 1. Its launch benchmark reported 18× the throughput of Laravel PHP: 1,774 successful requests per second versus 97. That’s a result from a specific load test, not a claim that every request runs 18× faster. At a steady 50 requests per second, p99 latency was 117 ms versus 127 ms. Both numbers are worth looking at, because they answer different questions: how much traffic one instance can absorb, and how long a request takes before the instance is overloaded.

The throughput result is worth paying attention to. So is the detail that the PHP baseline already used Octane on FrankenPHP. The early independent tests make this more interesting: change the load pattern, the data layer, or the HTTP server and you can change both the size of the gap and the order of the runners.

What Laravel brought to Rust

Laravel Rust is a separate, open-source framework built on Axum and Tokio. It brings Laravel's conventions for routing, middleware, authentication, sessions, database models, migrations, queues, mail and testing into a Rust application. It also supports Inertia, so a team can keep React, Vue or Svelte as its frontend rather than taking on a frontend rewrite just to try a different backend. Keeping the UI is possible if you preserve what it relies on: routes, page props, validation errors, permissions and redirects.

The pieces I would look at first are typed request inputs and durable workflows. Typed inputs let you define a payload as a Rust struct and validate it at the edge. A partial update can distinguish a field that was omitted from a field explicitly set to null. That distinction matters when “leave the email address alone” and “clear the email address” are different product actions. The Rust type can represent both; the authorization policy still decides who may perform either.

Durable workflows give a name and a place to track work that outlives a request. Think of onboarding: send a welcome email, wait three days, check whether the user created a project, then send a reminder only if needed. That is a better pilot than a hello-world route because it exercises state, retries and recovery. I would deliberately interrupt a worker during the flow and verify what happens on restart. When an external provider accepts an email or webhook but the worker never records success, retries may still duplicate the side effect. I would test that boundary and use an idempotency key where the provider supports it.

What Laravel's 18× result measures

Sam Rose's benchmark (opens in a new tab) ran two read-only routes on Laravel Cloud: a paginated feed and a detail endpoint, backed by MySQL with 200 posts and 10 authors. Each application had one vCPU and 4 GiB. A separate k6 generator increased the offered load from 1 to 2,000 requests per second over 20 minutes. The headline compares each app's best qualifying 10-second interval with no recorded HTTP failures. It does not compare two requests at the same point on the ramp.

MeasureLaravel RustLaravel PHP
Best qualifying ramp throughput1,774 req/s97 req/s
p95 latency at 50 req/s93 ms111 ms
p99 latency at 50 req/s117 ms127 ms
Peak recorded app CPU at 50 req/s4.2%52.4%

The published benchmark configuration (opens in a new tab) uses Laravel 13, PHP 8.5, Eloquent and four Octane workers on FrankenPHP. So “just turn on Octane” does not explain away this comparison. It also does not isolate the cost of the languages. The stacks differ in how they run requests, query and materialize data, and serialize responses. At the fixed load, the big difference here was how much CPU the app used. That could translate into more headroom on the same instance, but it does not promise an 18× improvement in page latency or an 18× lower bill. Laravel also reported that a median cold build on Cloud took about three minutes for Rust versus 27 seconds for PHP.

What the independent tests add

An X benchmark shared by @ihxnnxs (opens in a new tab) has a public test repository (opens in a new tab), which is more useful than the chart alone. The author adapted the same two-route workload to Docker on a Ryzen 7 laptop-class CPU, capped each app at one vCPU, and used local HTTP with gzip. In the author’s published table, Laravel Rust and Symfony on Swoole both reached roughly 1,990 successful requests per second in their best windows, near the end of the offered-load ramp. That shows both handled that level on this setup. It does not establish their ceilings or prove one language is faster.

The informative comparison in that repo is the author's two Laravel PHP variants. The Eloquent version reported 137 req/s in its selected window. The variant with tracing JIT, a query projection using toBase(), a join and explicit serialization reached 1,061 req/s, but the load generator dropped iterations even in that window. A dropped iteration is planned work the generator did not start; it can happen when available virtual users are tied up. Zero HTTP errors therefore does not imply the test sustained the offered load. Several settings changed together, so this result does not tell us how much of the gain came from any one of them.

AI Heartland ran a separate local comparison (opens in a new tab) using 64 concurrent connections, 30-second runs and a median of three trials. It reported about 2,596 req/s for Laravel Rust, 110 for Laravel PHP on Octane and FrankenPHP, and 3,363 for Rocket. Rocket finished ahead of Laravel Rust there, while Laravel Rust finished ahead of Rocket in Laravel's Cloud ramp. The local test had a colocated database and a different load pattern. I'd read the two tests as measurements of those deployments, not combine them into one leaderboard.

The case for conventions when an agent writes the code

The release ships starter projects with agent skills for Laravel Rust. That matters more to me than whether an agent can generate a route in a new language. If the framework already defines where validation, policies and jobs belong, there are fewer architectural choices to reinvent on every task. A strict compiler can reject mismatched types and ownership errors before review. It cannot tell whether an authenticated user should be able to view a particular invoice or whether a retry will send a second email.

For an agent-built feature, I would give it three acceptance tests up front: a valid request succeeds, a request from another tenant fails, and replaying the same job does not repeat the external effect. Then I would ask the reviewer to check that those tests actually ran and covered the intended paths. The compiler, framework conventions and behavior tests each catch different mistakes.

Where I would try it first

For a new service, I would pick one feature with a real database read, an authenticated write and a background job. I would check the libraries and integration gaps before committing. Similar framework features do not make existing Composer dependencies, auth sessions or serialized jobs portable. For a healthy PHP application, I would keep it in place and profile one slow endpoint first. If most of its time goes to a database query or a third-party API, changing the web framework does not remove that wait.

For the pilot, I would use the current production-style PHP stack as the baseline. Match payloads, auth, validation, indexes, query counts, warm-up and caching. Test with a realistic dataset, from a separate load generator, at ordinary load and during a burst. Pick a target in advance, such as sustained throughput below a 200 ms p95 with fewer than 0.1% errors. Count timeouts and dropped iterations as well as successful requests. Record app CPU, database CPU, memory, worker lag and cold build time. Check rollback and the failure paths before routing customer traffic.

Laravel Rust has made a convincing case for trying a full-stack Rust application without assembling all the infrastructure from scratch. The beta is where I would test a new feature or isolate a proven bottleneck. The decision to migrate comes later, when the workload, operating cost and maintenance tradeoffs are yours rather than the benchmark author's.

The views, thoughts, and opinions expressed in this post are solely my own and do not necessarily reflect those of my employer.