← Ramp Interview InsightsSoftware Engineer

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Ramp for a software engineer role. The whole thing was one big question about building a hotel booking aggregator, and it went pretty deep into caching tradeoffs and upstream API behavior. Felt like a solid interview but also the kind where you realize halfway through that you've been thinking about it slightly wrong.

Questions Asked (4)

Q1

Design a hotel reservation aggregator like Expedia that searches and books rooms across multiple hotel chains. Cover real-time availability, atomic booking confirmation, and cancellation/refund flows.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

I started with the search flow and availability reads, which felt natural, but I underestimated how much time the interviewer wanted to spend on the booking confirmation part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a high-level architecture with separate services for search, booking, and cancellation. Focus on the critical flows: real-time availability aggregation, atomic booking with distributed transactions, and idempotent cancellation/refund handling. Discuss trade-offs between consistency, latency, and cost, and how to handle failures and partial failures.

Pro tip: Emphasize idempotency and compensation patterns (like Saga) for booking and cancellation, and discuss how to handle race conditions when multiple users try to book the same room. Also, mention the importance of caching and rate limiting to protect downstream hotel APIs.

1. Clarify Requirements and Scope

Ask questions to understand scale (e.g., number of hotels, users, bookings per second), consistency needs (e.g., strong vs eventual), and key features like search, booking, cancellation, and refunds. Define non-functional requirements like latency, availability, and durability.

2. High-Level Architecture

Sketch the main components: API gateway, search service, booking service, cancellation service, and integrations with hotel chains. Include data stores (e.g., inventory cache, booking DB) and messaging queues for async processing.

3. Real-Time Availability Search

Design how to aggregate availability from multiple hotel APIs in real-time. Discuss caching strategies (e.g., short TTL), parallel requests, fallbacks, and handling API rate limits and failures.

4. Atomic Booking Confirmation

Explain how to ensure atomicity across multiple hotel chains using distributed transactions (e.g., two-phase commit) or Saga pattern with compensation. Cover idempotency keys, locking, and handling partial failures.

5. Cancellation and Refund Flows

Design cancellation and refund processes, including idempotent operations, state machines, and reconciliation with hotel chains. Discuss how to handle refunds asynchronously and ensure consistency.

Key Points to Mention

  • Idempotency keys for booking and cancellation to prevent duplicate operations.
  • Saga pattern or two-phase commit for distributed transactions across hotel chains.
  • Caching strategies for availability data with appropriate TTL and invalidation.
  • Handling race conditions and concurrency control (e.g., optimistic locking, distributed locks).
  • Asynchronous processing and message queues for booking confirmations and refunds.
  • Monitoring, alerting, and reconciliation for failed bookings or refunds.

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

Q2

Should the aggregator call upstream hotel APIs on every availability read, cache the results, or pre-allocate a block of inventory in advance? Walk through the tradeoffs.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is where I spent most of my time and where I think I did okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business context: what are the latency, cost, and consistency requirements? Then compare the three options—direct API calls, caching, and pre-allocation—across dimensions like latency, cost, freshness, complexity, and failure modes. Finally, propose a hybrid solution that balances tradeoffs, such as caching with short TTLs and fallback to direct calls, or pre-allocating only for high-demand periods.

Pro tip: Emphasize that the 'right' answer depends on the specific use case—e.g., real-time booking vs. search—and that a one-size-fits-all solution is rarely optimal. Show you can quantify tradeoffs (e.g., cost per call, cache hit rate) and suggest monitoring to adapt dynamically.

1. Clarify Requirements

Ask about expected read volume, latency SLAs, budget constraints, and tolerance for stale data. Understand if inventory is highly dynamic or relatively static.

2. Evaluate Direct API Calls

Discuss pros: always fresh, simple. Cons: high latency, rate limits, cost, and dependency on upstream availability. Suitable for low-volume or critical real-time checks.

3. Evaluate Caching

Discuss pros: reduced latency and cost, handles bursts. Cons: stale data, cache invalidation complexity, potential overbooking. Suitable for read-heavy, tolerant-to-staleness scenarios.

4. Evaluate Pre-allocation

Discuss pros: guaranteed inventory, fast reads, predictable cost. Cons: risk of unused inventory, upfront commitment, synchronization issues. Suitable for high-demand, predictable events.

5. Propose Hybrid and Recommend

Combine approaches: e.g., cache with short TTL and fallback to direct calls, or pre-allocate for peak seasons. Recommend based on requirements and suggest monitoring to adjust.

Key Points to Mention

  • Latency vs. freshness tradeoff: caching reduces latency but risks stale data; direct calls ensure freshness but add latency.
  • Cost implications: API call costs, cache infrastructure, and pre-allocation commitments (e.g., prepaid blocks).
  • Consistency and correctness: risk of overbooking with caching, need for strong consistency in pre-allocation.
  • Scalability and rate limits: upstream API rate limits may force caching or pre-allocation.
  • Failure modes: upstream downtime, cache stampede, pre-allocation mismatch.
  • Hybrid solutions: e.g., cache-aside with TTL, write-through for updates, or dynamic pre-allocation based on demand forecasting.

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

Q3

How do you handle the tail latency problem when your cached or pre-allocated room pool is exhausted and you have to fall back to a live upstream API call?

System DesignTechnical Trade-offs
Author's notes

Honestly the part I handled worst.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that tail latency is inevitable when falling back to a live upstream API, then propose a multi-layered mitigation strategy that includes timeouts, circuit breakers, and graceful degradation. Emphasize the trade-offs between consistency, availability, and latency, and how you would monitor and iterate on the solution.

Pro tip: Show that you think about the user experience during degradation—e.g., returning a slightly stale or approximate result instead of an error—and mention how you'd use load shedding and priority queues to protect critical traffic.

1. Acknowledge the problem and set expectations

Explain that tail latency spikes are expected when the cache is exhausted, and that the goal is to minimize impact rather than eliminate it entirely.

2. Implement defensive mechanisms

Describe using timeouts, retries with exponential backoff and jitter, circuit breakers, and bulkheads to prevent cascading failures and limit the blast radius.

3. Prioritize and degrade gracefully

Discuss prioritizing critical requests, serving degraded responses (e.g., stale data, approximations), and using fallbacks like static defaults or queuing for later processing.

4. Monitor and adapt

Mention setting up detailed metrics (p99, error rates) and alerts, and using adaptive strategies like dynamic timeouts or load shedding based on real-time conditions.

5. Evaluate trade-offs and iterate

Summarize the trade-offs made (e.g., consistency vs. availability) and how you would continuously test and refine the approach with chaos engineering and load testing.

Key Points to Mention

  • Timeouts and retries with exponential backoff and jitter
  • Circuit breakers and bulkhead patterns to isolate failures
  • Graceful degradation: serving stale or approximate data, or static fallbacks
  • Priority queues and load shedding to protect critical traffic
  • Monitoring and observability: tracking p99 latency, error rates, and cache hit ratios
  • Trade-offs between consistency, availability, and latency (CAP theorem)

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

Q4

How would you partition and refresh the availability cache, and what's your failure handling strategy when an upstream hotel API is slow or completely down?

System DesignAPI & Integrations
Author's notes

Partitioning by hotel, region, and date felt obvious once I said it out loud.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: read/write patterns, consistency needs, and scale. Then propose a partitioning strategy (e.g., by hotel ID or region) and a refresh mechanism (e.g., TTL-based with proactive refresh). Finally, detail failure handling: circuit breakers, fallbacks to stale data, and graceful degradation.

Pro tip: Emphasize that stale data is often better than no data for availability, but you must communicate staleness to the user and have a way to recover quickly. Also, mention that you'd monitor cache hit rates and upstream latency to detect issues early.

1. Clarify requirements and constraints

Ask about read/write ratio, consistency requirements, acceptable staleness, and traffic patterns. This shows you don't jump to solutions without understanding the problem.

2. Design partitioning strategy

Propose partitioning by hotel ID (hash-based) or geographic region to distribute load and enable parallel refreshes. Discuss trade-offs like hot keys and rebalancing.

3. Define refresh mechanism

Suggest a combination of TTL-based expiration and proactive background refresh (e.g., via a job queue). Consider write-through vs. write-behind and how to handle cache misses.

4. Outline failure handling

Describe using circuit breakers, timeouts, and retries with exponential backoff. Fallback to stale cache data if upstream is down, and degrade gracefully (e.g., show last known availability with a warning).

5. Monitor and iterate

Mention monitoring cache hit rate, upstream latency, and error rates. Use this to tune TTLs, circuit breaker thresholds, and alerting.

Key Points to Mention

  • Partitioning by hotel ID or region to distribute load and avoid single points of failure
  • TTL-based expiration with proactive refresh to keep data fresh without overwhelming upstream
  • Circuit breaker pattern to prevent cascading failures when upstream is slow or down
  • Fallback to stale data with clear staleness indicators to maintain user experience
  • Retry with exponential backoff and jitter for transient failures
  • Monitoring and alerting on cache hit rate, latency, and error rates to detect issues

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