How Rewriting Hasura Storage in Go Boosted Performance Fivefold
The Hasura Storage team rewrote their Node.js service in Go, ran k6 benchmarks, and achieved up to five times more request handling, half the memory usage, and significantly lower response times across multiple download scenarios, demonstrating the scalability benefits of Go for backend services.
Hasura Storage is an open‑source service that adds a storage layer on top of Hasura and any S3‑compatible storage, leveraging Hasura’s GraphQL API, permissions, actions, and presets.
To meet growing business demands, the team rewrote the original Node.js service in Go because the Node.js version struggled with performance as user numbers scaled.
After the rewrite, Hasura Storage reported a five‑fold increase in handled service requests and a 50% reduction in memory consumption.
The Go language’s dependency and build system make it well‑suited for cloud environments.
The team has extensive Go experience.
Although Go is more verbose than Node.js, it is easy to learn and fast to write.
Performance is excellent.
Benchmarking was performed with k6, using the following test cases:
download_small_file download_medium_file download_large_file download_image download_image_manipulatedThe test ramped workers from 1 to the target count over the first 10 seconds, then ran for 60 seconds, with CPU limited to 10% of the system and RAM considered unlimited.
Results showed that in every scenario the request capacity increased dramatically, especially for smaller files (up to 5×). Memory usage also improved significantly, even when handling up to five times more requests.
Response time metrics included minimum response time (baseline) and P95 (95th percentile under load). Minimum response times improved from 29 ms in Node.js to 7 ms in Go for the download_small_file case, with roughly 4× gains in most other scenarios. P95 improvements were also around 4× for most tests, with notable gains in large file downloads and image manipulation.
Images below illustrate the benchmark results and the reduction in RAM usage after the rewrite.
After the rewrite and testing, the service was deployed to production, where RAM usage on a cluster node dropped by nearly 40%, confirming a major improvement that allows serving more users and traffic without increasing overall infrastructure costs.
Overall, the Hasura Storage team concluded that the Go rewrite successfully enhanced all performance metrics while using fewer resources.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
