← Oracle Interview Insights

Oracle·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

Oracle system design round for a software engineer role. One question, pretty deep, they wanted a full rate limiting design for an API gateway covering distributed setups, concurrency, observability, the works.

Questions Asked (1)

Q1

Design a rate limiting system for an API gateway that handles per-key limits (user, IP, token), correctness under concurrent and bursty traffic, multi-instance distribution, limit-exceeded responses, and configurable limits per endpoint or customer tier.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one sprawled fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale, latency, accuracy vs. availability, and multi-region needs. Then propose a distributed architecture using a fast in-memory store like Redis with atomic operations (e.g., Lua scripts) for per-key counters, and discuss trade-offs between algorithms (token bucket vs. sliding window) and consistency models. Finally, cover failure modes, observability, and dynamic configuration.

Pro tip: Emphasize that rate limiting is a trade-off between accuracy and availability—sometimes it's acceptable to over-limit or under-limit during failures. Also, mention that returning 429 with Retry-After and rate limit headers improves client experience and reduces retries.

1. Clarify Requirements and Constraints

Ask about scale (QPS, number of keys), latency targets, accuracy requirements, multi-region deployment, and whether limits are per endpoint, user tier, etc. This scopes the design.

2. Choose a Rate Limiting Algorithm

Select an algorithm like token bucket (allows bursts) or sliding window (smoother) based on requirements. Discuss pros and cons, and how to implement it atomically in a distributed store.

3. Design Distributed State Management

Use a centralized store like Redis with Lua scripts for atomicity, or a distributed approach like gossip with local counters. Address consistency, replication, and failure handling.

4. Handle Limit Exceeded and Configuration

Define response behavior: 429 status, Retry-After header, and rate limit headers. Explain how to dynamically update limits per endpoint or customer tier without redeploying.

5. Address Scalability, Fault Tolerance, and Observability

Discuss sharding, caching, fallback strategies (e.g., local rate limiting if Redis is down), and monitoring metrics like limit hits and latency.

Key Points to Mention

  • Use of atomic operations (e.g., Redis Lua scripts) to ensure correctness under concurrency.
  • Trade-offs between different rate limiting algorithms (token bucket, leaky bucket, fixed/sliding window).
  • Handling bursts: token bucket allows bursts up to bucket size, while sliding window smooths traffic.
  • Multi-instance distribution: centralized store vs. distributed counters, and consistency models (eventual vs. strong).
  • Limit-exceeded response: HTTP 429 with Retry-After and X-RateLimit-* headers for client guidance.
  • Dynamic configuration: storing limits in a database or config service, with caching and hot-reload.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.