Catalogue / grab-2023-frequency-capping

Grab caps marketing messages per user with roaring-bitmap segment lookups loaded from S3 and pipelined Redis sliding-log Lua scripts

Grab, 2023. Marketing communications frequency capping service.

Organisation
Grab
Evidence
Reported from production
Source
Sliding window rate limits in distributed systems

Grab Tech Blog, published 2023-12-14

Records

Decision#d1

Store user segment membership for 270M+ users in roaring bitmaps downloaded from S3 at startup instead of Bloom filters

Decision#d2

Enforce per-user frequency caps with a Redis sorted-set sliding log instead of DynamoDB or a sliding window limiter

Decision#d3

Preload the Lua script via SCRIPT LOAD and pipeline per-user EVALSHA calls to avoid Redis Cluster CROSSSLOT errors

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free.