<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj" -->

---
title: Why We Chose Rust over Go for Our New Caching Layer
description: A team that previously migrated from Node.js to Go found Go&#x27;s garbage collector caused P99 latency spikes of 50–100ms in a high-throughput in-memory caching...
canonical: https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why We Chose Rust over Go for Our New Caching Layer | daily.dev
og:description: A team that previously migrated from Node.js to Go found Go&#x27;s garbage collector caused P99 latency spikes of 50–100ms in a high-throughput in-memory caching...
og:url: https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj
og:image: https://api.daily.dev/og/posts/MnZbCRfMJ.png
og:image:alt: Why We Chose Rust over Go for Our New Caching Layer
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why We Chose Rust over Go for Our New Caching Layer

**[Medium](https://daily.dev/sources/medium_js)** · 4 min read · 47 upvotes · 6 comments

## Summary

A team that previously migrated from Node.js to Go found Go's garbage collector caused P99 latency spikes of 50–100ms in a high-throughput in-memory caching layer processing millions of requests per second. They rewrote the cache in Rust using DashMap, eliminating GC pauses entirely. Results: P99 latency dropped from 50ms to 1.5ms, memory usage fell 70%, and CPU usage halved. The conclusion is that Go remains the default for standard microservices, but Rust is the right tool for extreme, latency-sensitive workloads.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@ajisalipay/why-we-chose-rust-over-go-for-our-new-caching-layer-3fbbed0d75fa>

## Community discussion

Top comments from developers on daily.dev.

**@petermrozek** · 7 upvotes

> This will always be a tradeoff of GC-powered solutions. No matter how efficient the GC itself is, there's always gonna be a few cases where some form of "stop the world" is in order for effective cleanup.
>
> This is the sole reason why I decided on using Rust. No need to be so careful when managing memory as with C/C++ and no GC tradeoffs as with Go, Java, JS, etc. The other rules (borrow checker, etc.) were just an additional plus. 🙂

**@bob72** · 5 upvotes

> I would be interested to know what kind of data do they keep in this cache? And all the metrics before and after. They just briefly mentioned p99.
>
>
> Words like "Rust" and "blazingly fast" do not make article good.
>
>
> When I approached by anyone in my company with the crazy idea to rewrite anything or to add caching, I always ask, "what problem are you trying to solve"? In most cases people can't answer.
>
>
> I see the same here, was p99 is actual problem, what was improved after? Costs? More happy clients? How do you measure happiness?
>
> Also, if your backend is mostly Go, super-fast caching will...

**@gaburayondev** · 1 upvotes

> Solid results, but curious what their Go GC tuning looked like before they gave up on it — GOGC, memory limits, and generational GC in newer versions can close a lot of that gap. Not saying Rust wasn't the right call for a cache this hot, just that "Go GC causes latency spikes" is often step 1 of the story, not the end of it.

## Similar posts on daily.dev

- [AWS shows Rust love at re:Invent: 10 times faster than Kotlin, one tenth the latency of Go • DEVCLASS](https://daily.dev/posts/aws-shows-rust-love-at-re-invent-10-times-faster-than-kotlin-one-tenth-the-latency-of-go-devclas-2oyry2vcw) · DEVCLASS · 22 upvotes · 1 comments

---

Tags: [#golang](https://daily.dev/tags/golang), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why We Chose Rust over Go for Our New Caching Layer","url":"https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj"},"datePublished":"2026-07-26T19:30:20.992Z","dateModified":"2026-07-26T22:18:08.634Z","description":"A team that previously migrated from Node.js to Go found Go's garbage collector caused P99 latency spikes of 50–100ms in a high-throughput in-memory caching...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3bdd640efac8f71eef98a6c842d9f044?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3bdd640efac8f71eef98a6c842d9f044?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":6,"discussionUrl":"https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":47},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":6}],"keywords":"golang,rust","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Why We Chose Rust over Go for Our New Caching Layer"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/why-we-chose-rust-over-go-for-our-new-caching-layer-mnzbcrfmj","comment":[{"@type":"Comment","text":"This will always be a tradeoff of GC-powered solutions. No matter how efficient the GC itself is, there’s always gonna be a few cases where some form of “stop the world” is in order for effective cleanup.\nThis is the sole reason why I decided on using Rust. No need to be so careful when managing memory as with C/C++ and no GC tradeoffs as with Go, Java, JS, etc. The other rules (borrow checker, etc.) were just an additional plus. 🙂","datePublished":"2026-07-27T06:19:43.347Z","url":"https://daily.dev/posts/MnZbCRfMJ#c-PXFf25evm","author":{"@type":"Person","name":"Peter Mrożek","url":"https://daily.dev/petermrozek","image":"https://media.daily.dev/image/upload/s--pBfYX68K--/f_auto/v1769247960/avatars/avatar_Qz65P1nVw3Bu6C5YwaZgA?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7}},{"@type":"Comment","text":"I would be interested to know what kind of data do they keep in this cache? And all the metrics before and after. They just briefly mentioned p99.\nWords like “Rust” and “blazingly fast” do not make article good.\nWhen I approached by anyone in my company with the crazy idea to rewrite anything or to add caching, I always ask, “what problem are you trying to solve”? In most cases people can’t answer.\nI see the same here, was p99 is actual problem, what was improved after? Costs? More happy clients? How do you measure happiness?\nAlso, if your backend is mostly Go, super-fast caching will not help, you still get GC pauses from the main backend, no? Author does not explain this but hyping about rust.","datePublished":"2026-07-27T20:45:25.159Z","url":"https://daily.dev/posts/MnZbCRfMJ#c-08jm5kxCS","author":{"@type":"Person","name":"Bob","url":"https://daily.dev/bob72","image":"https://avatars.githubusercontent.com/u/193962566?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"Solid results, but curious what their Go GC tuning looked like before they gave up on it — GOGC, memory limits, and generational GC in newer versions can close a lot of that gap. Not saying Rust wasn’t the right call for a cache this hot, just that “Go GC causes latency spikes” is often step 1 of the story, not the end of it.","datePublished":"2026-07-29T09:03:38.329Z","url":"https://daily.dev/posts/MnZbCRfMJ#c-lFUrU02Vr","author":{"@type":"Person","name":"Gabu Rayon Dev","url":"https://daily.dev/gaburayondev","image":"https://media.daily.dev/image/upload/s--5hPC52y_--/f_auto/v1773412842/avatars/avatar_8fkdziGASnSSBES6c4Ml9?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

