Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A live marketplace can be rewritten from Spring Boot to Rust without changing its database or public URLs—but the hard part is proving the new application behaves the same. In this case study, Özkan Pakdil reports similar response times across Spring Boot and Rust implementations, substantially lower Rust memory use in the tested setup, and migration work that went well beyond translating code.

What changed in the marketplace rewrite

Pakdil’s September 2025 account describes a rewrite of mpazari.com with a specific compatibility goal: keep the existing PostgreSQL database, URLs, and behavior while replacing the application engine. The previous application used Spring Boot MVC, Thymeleaf, Spring JDBC, PostgreSQL, and Spring Session. The replacement used Warp 0.3 with a hand-built filter chain, minijinja 2 templates, sqlx 0.8 with plain SQL against the same schema, and a stateless HMAC-SHA256-signed JSON cookie for session state. The reported Rust deployment artifact was a 21 MB binary. Read Pakdil’s account.

The marketplace also carried history from an earlier ASP.NET implementation: legacy .aspx URLs remained in circulation. The rewrite retained a legacy redirect map, and the team tested its rows with Playwright. That detail matters because old links and redirects can be part of a live product’s behavior even when they belong to a previous generation of software.

What the reported load test found

The author compared the implementations on the same Hetzner machine running Ubuntu 20.04, using the same PostgreSQL data. k6 mapped the hostname directly to the application port to avoid proxy effects. The scenario ramped to 50 virtual users over one minute, held at 50 for five minutes, then ramped down over one minute. Each iteration fetched the home page and slept for one second. The stated thresholds were p95 below 200 ms and p99 below 500 ms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These are Pakdil’s measurements for that machine, request path, workload, and database—not an independently reproduced benchmark or a general comparison of the languages.

Implementation Average p95 p99 Requests Failed RSS under load Artifact
GraalVM native 158.58 ms 172.57 ms 178.64 ms 15,570 0% 134–154 MB 112 MB
Spring Boot JAR 156.97 ms 171.86 ms 177.16 ms 15,590 0% 477–949 MB 32 MB JAR
Rust with Warp and sqlx 160.89 ms 179.45 ms 191.91 ms 15,545 0% 20–40 MB 21 MB binary

In this run, the Spring Boot JAR had slightly lower p95 and p99 latency than Rust. Rust’s reported RSS under load was lower than either Java-based option, while the Rust artifact was smaller than the GraalVM native artifact and smaller than the JAR. Those figures describe this deployment and should not be treated as runtime guarantees or as proof that one language is universally faster.

Pakdil also reports idle RSS of about 4 MB for the native image before requests touched more pages, about 477 MB for the Spring Boot JAR, and 19 MB for Rust. The article attributes the JAR’s initial footprint to a configured 1 GB minimum heap. These idle figures and the explanation are likewise specific to the author’s setup.

Why the first Rust performance run was slow

The initial Rust load test did not resemble the final reported result: average latency was 757 ms and p95 was 952 ms, accompanied by high CPU use. Profiling traced the problem to a regular expression compiled on every request. A Lazy value had been created inside the request call instead of in a long-lived static. Moving the cache to a static eliminated the regex frames seen in the profile; the subsequent run was reported at about 161 ms average and 179 ms p95.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The practical lesson is to profile the production-like request path rather than infer performance from the language or framework. An avoidable per-request operation can overwhelm any expected advantage from changing runtimes.

Behavioral parity required matching caches and queries

Performance and compatibility also depended on reproducing application behavior. The Java application cached brand, city, category, and count data. The first Rust implementation instead queried related tables on every request. Pakdil says the team ported the one-hour taxonomy cache and ten-minute counts cache behavior, bringing per-request SQL to about five queries.

Some reports of empty pages turned out not to be database failures: handlers and templates disagreed about context-key names. A successful render therefore was not enough to establish that a migrated route showed the right data. Parity checks needed to validate the content and state presented to the user, not merely HTTP success.

How the team verified compatibility

The account describes 31 acceptance tests and 150 end-to-end tests. The concerns included legacy URLs, query-string shapes, redirects, and pages where missing template context could produce empty results. Those checks were central to the rewrite because preserving a route means preserving its externally visible behavior, not just making its URL return a page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deployment was described as copying a same-named binary, restarting the application, running a health sweep, and rolling back if the service was unhealthy. That is the author’s account of this project, not a universal deployment recipe. The useful principle is to make rollback a planned part of the migration rather than relying on a successful build as evidence of production readiness.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to evaluate a similar rewrite

“Should I rewrite my Spring Boot application in Rust?” cannot be answered by this one marketplace’s numbers. The case is useful as a checklist of what to compare and preserve:

  • Run comparable tests: use the same host, database, request path, and workload where possible; record latency percentiles, failures, and resource consumption.
  • Measure the whole operational trade-off: include memory use and artifact size, but also the engineering effort needed to preserve behavior.
  • Match existing semantics: check caches, query counts, session behavior, templates, redirects, query-string handling, and legacy URLs.
  • Test what users actually see: an HTTP success or non-empty response does not prove the correct data reached the template.
  • Plan recovery: define health checks and rollback conditions before sending the rewritten application live.

Rust is a plausible choice if a team values lower resource consumption in its particular workload and can support the migration and maintenance cost. This account does not establish that Rust will be faster, cheaper, or a better fit for another Spring Boot application; those outcomes depend on the application and the quality of both implementations.

Learning Rust

For readers considering the language, The Rust Programming Language is an introductory book with a free online edition. The official site lists print and ebook formats through No Starch Press. No Starch Press lists a third edition as a 624-page print book published in March 2026. The book is an optional learning resource, not a tool identified as part of this marketplace rewrite. See the publisher’s third-edition listing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.