Last updated 2026-05-18

Architecture

The service is deployed independently per product. Every deployment owns its Redis data, optional event sink, and runtime security boundary.

Product A -> quota-service -> Product A Redis -> Product A event sink
Product B -> quota-service -> Product B Redis -> Product B event sink
Product C -> quota-service -> Product C Redis -> Product C event sink

Shared across deployments

  • Docker image
  • gRPC API
  • protobuf schema
  • Redis scripts
  • documentation

Not shared across deployments

  • Redis counters
  • reservation and lease records
  • historical usage events
  • tenant, user, or customer data

Hot path

  1. Check idempotency for the request ID.
  2. Validate supplied limits.
  3. Evaluate all limits in one Redis Lua script.
  4. Deny without mutation if any limit fails.
  5. Mutate all impacted keys when every limit allows.
  6. Return a decision and per-limit statuses.