Grab
Grab logoGrab · Feature trail

Highly Concurrent In-Memory Counter

1 post · Oct 2019 – Oct 2025

What this trail covers

Grab's Counter Service has evolved into a self-service platform for fraud detection, enabling data scientists and analysts to create and manage counters without direct engineering intervention. The system is designed for high scalability, handling billions of transactions daily by leveraging Aerospike for time-series data storage with a map-based schema for optimized storage and retrieval. This migration focused on decoupling storage concerns from business logic, redesigning the data model, and implementing a highly concurrent in-memory counter with periodic flushing to reduce database load. The use of Sync.Map in GoLang has shown significant performance improvements over traditional mutex-based approaches for high-concurrency, read-heavy workloads.

All Grab trails