Katkat

Design a geo-distributed rate limiter

PlaidSoftware Engineer · Technical Screen

Last updated

This question evaluates a candidate's competency in designing geo-distributed, globally consistent rate limiting systems that enforce per-API-key and additional constraints while balancing low-latency request paths and regional failure tolerance.

Design a rate limiting system that works across multiple geographic regions (e.g., us-east, eu-west, ap-south).

Requirements:

  • Enforce per-API-key limits (e.g., 100 requests/sec) and possibly additional limits (per-IP, per-endpoint).
  • Requests can hit any region; the limit should be respected globally (not multiplied by number of regions).
  • Low latency in the request path; tolerate region failures.

Follow-up: You have a worker system that must execute tasks under rate limiting, and you are considering two scheduling strategies:

  1. Prioritize tasks with the largest cost/weight first.
  2. Prioritize executing as many tasks as possible (maximize throughput / number of tasks).

Explain pros/cons of each strategy and when you would choose which.