---
topic: dev-practices
author: Crashtech Editorial
published: Nov 15, 2026 · read: 4 min
---

Grab’s Counter Service Rewrite: What Go-to-Rust Migration Actually Changed

Grab reports 70% infrastructure savings at similar performance after rewriting a high-QPS Go service in Rust—and documents the async pitfalls behind the result.

– –
Hands fit a compact metal mechanism into a counter machine while matching blue and orange event streams move through it.
Conceptual illustration of a service rewrite preserving behavior while changing its runtime; not a Grab system diagram.

A rewrite story can sound like a language benchmark when the real result depends on service shape. Grab describes a Counter Service used by its Integrity Data Platform and explains why the team chose it, how the rewrite was approached, and what went wrong. The reported 70% savings belong to that deployment, not to Rust as a universal multiplier. [1]

Why this service was a candidate

Grab says most of its microservices were written in Go, a choice the company valued for simplicity and developer iteration. The team chose one high-QPS service for a rewrite rather than proposing a wholesale migration. This matters: a service with a narrow contract and measurable resource use is a safer experiment than a business-critical system whose behavior is difficult to specify.

The Counter Service answers time-windowed count questions used by other parts of Grab’s platform. A separate storage-migration post describes queries such as counting recent ride requests or failed payment attempts, and says the service handled tens of thousands of queries per second and roughly a billion requests per day at that time. These are figures from that later report and its period, not a current independently audited service metric. [2]

A useful rewrite candidate therefore has an observable boundary: input and output behavior can be compared, dependencies are known, and infrastructure consumption is meaningful. “The team likes a language” is not enough. The new implementation must be supportable by the team that will own it after launch.

The migration result is specific

Grab’s engineering post reports approximately 70% infrastructure savings while maintaining similar performance. That result makes the article interesting, but its denominator is the Counter Service deployment and the company’s measurement approach. It should not be generalized to arbitrary Go services, and “cost savings” should not be silently translated into a claim that every request became 70% faster. [1]

To evaluate a similar proposal, define the metric first: CPU cores per throughput unit, memory footprint, instance count, cloud spend, tail latency, or some combination. Keep the workload and request mix stable, measure cold starts and steady state separately where relevant, and check whether the service is CPU-bound, memory-bound, I/O-bound, or waiting on a shared dependency.

Async boundaries can erase the expected gain

The most concrete pitfall in Grab’s account is an initial implementation that called a synchronous Redis function from an asynchronous Rust service. The call blocked a runtime worker while waiting on the cache. The team replaced it with an asynchronous Redis client. This is a reminder that async syntax does not make a blocking library non-blocking; one such call can stall unrelated futures scheduled on the same worker. [1] [3]

Go offers a different concurrency model: the runtime schedules goroutines and many blocking operations through runtime-aware libraries. Rust gives the programmer more explicit control over ownership and asynchronous execution, but that control adds design choices. A fair comparison includes client libraries, pool behavior, task scheduling, backpressure, timeout propagation, cancellation, and observability.

Keep the contract stable while changing the internals

A safe rewrite treats the existing implementation as a behavioral reference. Compare results for the same inputs, including edge cases and failure paths. Test dependency timeouts, retries, malformed requests, data updates, and partial failures. If the system supports shadow evaluation, compare outcomes without making the new service authoritative until the evidence is strong. A staged rollout with a rollback path limits the consequences of an unnoticed semantic difference.

The storage follow-up shows why a language rewrite and a backend migration should be separable. Grab describes decoupling storage concerns from business logic before moving the Counter Service data store to Aerospike, and revisiting its time-bucket model and access patterns. Combining changes can make attribution harder; explicit interfaces help isolate which change caused a result. [2]

A rewrite decision that can be reviewed

Before approving a rewrite, document the service boundary, baseline workload, measured bottleneck, expected gain, and migration plan. Assign an owner for the new language and libraries. Compare performance at equivalent reliability and operational settings; a benchmark that omits tracing, timeouts, retries, or production traffic shape can be misleading. After rollout, report both the outcome and the conditions that produced it.

Do

  • Treat Grab’s savings as a case study with its own workload and measurement boundary.
  • Profile blocking I/O and runtime scheduling before attributing resource use to the language.
  • Keep storage, protocol, and business behavior contracts testable through a staged migration.

Don't

  • Do not claim that Rust automatically reduces infrastructure costs by 70%.
  • Do not call synchronous I/O from an async runtime worker and expect async concurrency.
  • Do not combine multiple migrations without a way to attribute failures and gains.

A rewrite earns its place when the production measurement beats the cost of migration and long-term ownership. Grab’s account is strongest where it shows the engineering tradeoffs alongside the headline result.

Advertisement

Frequently asked questions

What did Grab report after rewriting Counter Service in Rust?

Grab reports about 70% infrastructure savings at similar performance for this service. That is the company’s result for its workload and deployment, not a guarantee for other Go-to-Rust rewrites.

Why did the first Rust implementation perform poorly?

Grab says the initial rewrite used a synchronous Redis call in an asynchronous application. Replacing it with an asynchronous Redis client addressed the blocking behavior.

Does Rust automatically make a microservice faster than Go?

No. Results depend on workload, runtime behavior, libraries, concurrency design, hardware, and measurement. Grab selected one service and reported an infrastructure-cost improvement while keeping performance similar.

What did Grab’s later storage migration change?

A separate engineering report describes moving Counter Service storage to Aerospike, decoupling storage from business logic, revisiting time-bucket access patterns, and rolling out the change gradually.

Sources & further reading

/* Comments */