Grab

How Grab Prevents App Performance Degradation Due to Sudden Ride Demand Spikes

Original post Preventing App Performance Degradation Due to Sudden Ride Demand Spikes

Article Summary

Grab's engineering team faced a brutal problem: rain in Southeast Asia would crash their entire ride-hailing system. When demand spiked locally, users everywhere suffered.

Grab's engineers built the 'Spampede' filter, a circuit breaker inspired solution that prevents localized demand spikes from degrading app performance globally. The system intelligently throttles requests when supply can't meet demand in specific geographic areas.

Key Takeaways

Critical Insight

By strategically rejecting requests in oversaturated areas, Grab prevented localized demand spikes from taking down their entire platform.

Continue reading

What This Article Covers

Problem

Grab's early system couldn't scale when demand spiked. Engineers had to work late nights to manage traffic during peak times, like rainstorms during morning rush hour.

Solution

The Spampede filter uses the Geohash Integer algorithm to convert pickup locations into geographic buckets. Unix timestamp formulas create time buckets. Unallocated requests are tracked in Redis with automatic TTL expiration.

Impact

By rejecting bookings in oversaturated areas before calling downstream services, Grab stopped localized demand spikes from breaking the entire system and affecting users everywhere.

The counterintuitive engineering decision that saved their business involves deliberately refusing customer requests, and the CAP theorem explains why it works.

This page summarizes “Preventing App Performance Degradation Due to Sudden Ride Demand Spikes” by Grab, published Jul 6, 2023. All credit for the original work goes to the authors.

Read the original on engineering.grab.com (opens in new tab)

AI tools for iOS

Browse all AI tools →