← Airbnb Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Airbnb system design round where they asked me to design a retry library from scratch. More open-ended than I expected, less about distributed systems trivia and more about API design philosophy and extensibility thinking.

Questions Asked (1)

Q1

Design a Retryer library that wraps a network operation and retries it on failure. Define the public API, explain the default behavior, describe how callers can customize it, and call out important edge cases.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This one is sneakily broad.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then define a clean, generic public API that separates policy (retry logic) from mechanism (network operation). Walk through the default behavior, customization points, and edge cases, emphasizing trade-offs and production readiness.

Pro tip: Show maturity by discussing how to make retries safe for non-idempotent operations and how to avoid retry storms with jitter and circuit breakers. Mention observability hooks (metrics, logging) early, as they are critical for debugging in production.

1. Clarify requirements and constraints

Ask about the expected use cases, failure types, latency budgets, and whether operations are idempotent. This ensures the design meets real needs and avoids over-engineering.

2. Define the public API

Design a generic interface (e.g., Retryer<T> with a call method) that accepts a function to execute and configuration options. Keep it simple and composable, allowing callers to wrap any network operation.

3. Specify default behavior

Describe sensible defaults: e.g., 3 retries, exponential backoff with jitter, retry on transient errors (timeouts, 5xx), and a maximum elapsed time. Explain why these defaults balance resilience and resource usage.

4. Explain customization options

Detail how callers can override defaults: max attempts, backoff strategy (fixed, exponential, custom), retry condition (predicate on exception/result), timeout per attempt, and hooks for logging/metrics.

5. Discuss edge cases and trade-offs

Cover important edge cases: non-idempotent operations (require idempotency keys), retry storms (use jitter and circuit breakers), cancellation, thread safety, and resource cleanup. Highlight trade-offs between simplicity and flexibility.

Key Points to Mention

  • Idempotency and safety: retries should only be automatic for idempotent operations or with idempotency keys.
  • Backoff strategies: exponential backoff with jitter to avoid thundering herd and reduce load on failing services.
  • Retry conditions: distinguish between transient (retryable) and permanent errors; allow custom predicates.
  • Observability: emit metrics (attempts, success rate, latency) and logs for debugging and alerting.
  • Circuit breaker integration: prevent retries when the downstream service is known to be down.
  • Resource management: ensure timeouts, cancellation, and cleanup to avoid leaks and thread exhaustion.

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