Skip to content

Development

Laravel Rust vs. Laravel PHP: what to measure before migrating

Learn what Laravel Rust is, compare it with Laravel PHP, and see how to test performance, startup time, and compatibility before migrating.

Published on December 2, 2026. 5 min read

Laravel released Laravel Rust in beta on December 1, 2026. In its official benchmark, the framework handled roughly 18 times as many requests per second as Laravel PHP during the best window of the traffic ramp. At a steady 50 requests per second, the difference in median response time was 16 ms. If you maintain an application in production, the conditions behind each figure matter.

What is Laravel Rust, and how does it compare to Laravel PHP?

It is an open-source web framework written in Rust by the Laravel team. The beta includes routing, typed validation, authentication, database models, queues, and Inertia. Laravel PHP developers will recognize the project structure. The application is written in Rust and compiled to a binary, with type and memory safety checks during compilation. The Laravel Rust announcement describes what the beta includes.

For an existing project, moving a component means reimplementing it in Rust. Check that replacements exist for the libraries you rely on and that the new implementation preserves authorization, response formats, and business rules. You can keep the rest of the application in PHP while testing one component.

What did the Laravel Rust benchmark measure?

The official benchmark compared applications with the same two read-only endpoints on equally sized instances. During the traffic ramp, Laravel chose each application's best ten-second window with no HTTP failures. In the steady-load test, peak CPU came from the full run and latency percentiles came from the busiest window.

MeasureLaravel RustLaravel PHP
Successful requests per second in the best ramp window1,77497
Median latency at 50 requests per second62 ms78 ms
Peak CPU at 50 requests per second4.2%52.4%
Median platform restore time for a sleeping application154 ms712 ms
Median cold cloud build time3 min 1 s27 s

The roughly eighteenfold difference applies to throughput in the selected ramp windows. Under steady load, the test showed more CPU headroom and a smaller difference in median latency. Restore time measures a platform operation. To find out how long a user waits, measure the first complete response, including the time spent waiting on databases and other services. Build time also matters if your team deploys several times a day or needs to reproduce a release quickly.

What stood out in Wellu's production data?

Wellu runs Laravel PHP. In the production sample, p95 CPU utilization was 13.9%, and the median time to start a new instance was about 8.8 seconds. Rodrigo Lorenzetti Cordova shared the measurements on LinkedIn. P95 is the value that about 95% of observations fall at or below. Median startup time is the midpoint of the recorded startups.

The next test should focus on startup and the first request after a period of inactivity. These numbers describe the current application. Any improvement from Rust remains a hypothesis until the same flow runs on the infrastructure that serves Wellu.

How can you test Laravel Rust in an existing system?

How to evaluate Laravel Rust in an existing system
  1. Measure the current app: Measure the first response after inactivity separately from traffic on active instances.
  2. Compare the same endpoint: Use the same rules, data, dependencies, and load for both implementations.
  3. Decide from the results: Compare latency, errors, resource use, and how easily you can roll back.
  1. Measure an important endpoint. Record first-response latency after inactivity, latency on active instances, errors, and time spent in the database. An AI assistant can help group request traces. Verify its classifications against a sample and use test or anonymized data.
  2. Implement the same endpoint in Rust. Start with a read endpoint that sees meaningful volume. Keep the same authorization rules, equivalent queries, and compatible responses. Use AI to suggest behavior parity tests and review cases involving denied access, missing data, and outages. For the Itaú Mulher Empreendedora project, UEEK built a learning management system and a website with content management. In a system like that, a course listing endpoint needs to preserve which content each user role can see.
  3. Compare the results and test rollback. Keep the region, instance size, and workload profile the same. Compare median and p95 latency, errors, CPU usage, and build duration. AI can help summarize the results. Base the decision on the measurements and the actual time it takes to restore the previous version.

If requests spend most of their time waiting on the database or an integration, investigate that dependency before migrating. For a product already in production, UEEK's software maintenance service can help measure the bottleneck and decide what to test.

Frequently asked questions

Does Laravel Rust replace Laravel PHP?

Laravel Rust is a separate framework from the Laravel team. Laravel PHP remains available, and existing PHP applications can continue their normal maintenance. The beta can be evaluated in an isolated test.

Can I use Composer PHP packages in Laravel Rust?

PHP packages do not run inside the Rust application. Look for equivalent libraries or keep the functionality in PHP behind a well-defined interface between the services.

Is it worth moving an entire system to Laravel Rust?

Measure the existing system and test an isolated component first. Consider a larger migration if the improvement holds under real workloads and the team can maintain the new implementation and safely roll back deployments.

Topics

  • Laravel
  • Rust
  • PHP

Related cases

Related solutions

Want this in production?

UEEK does this kind of work in Maintenance and support.

See the solution