← Ramp Interview Insights

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, focused on building a hotel availability service like what Expedia runs under the hood. Heavy on caching strategy, supplier integration tradeoffs, and concurrency edge cases. Felt pretty solid on the high-level design but the follow-ups on TTL decisions and last-room contention were trickier than I expected.

Questions Asked (6)

Q1

Design a hotel room availability service for a travel marketplace like Expedia, optimizing for low-latency search reads while keeping booking accuracy high despite external supplier APIs that are slow and unreliable.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This was the core question and it took a while to scope properly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a hybrid architecture that separates read and write paths: a cache or read-optimized store for fast availability searches, and a booking service that synchronizes with external suppliers using patterns like saga or two-phase commit with compensation. Emphasize trade-offs between consistency, latency, and reliability, and discuss how to handle supplier failures with retries, circuit breakers, and idempotency.

Pro tip: Mention that availability data is inherently stale and that you should display a 'last updated' timestamp or confidence score to set user expectations, while using optimistic UI updates for booking attempts. Also, highlight the importance of idempotency keys for booking requests to avoid double-charging customers when retrying failed supplier calls.

1. Clarify Requirements and Constraints

Ask about scale (QPS, number of hotels, suppliers), latency targets, consistency requirements, and failure modes. Confirm that search reads can tolerate slight staleness but bookings must be accurate and idempotent.

2. Design Read Path for Low Latency

Propose a multi-tier cache (e.g., CDN, Redis) and a read-optimized data store (e.g., Elasticsearch, DynamoDB) that aggregates availability from suppliers. Use asynchronous updates via a message queue to keep the cache fresh without blocking searches.

3. Design Write Path for Booking Accuracy

Implement a booking service that uses a saga pattern or two-phase commit with compensation to coordinate with external suppliers. Ensure idempotency, retries with exponential backoff, and circuit breakers to handle slow or unreliable APIs.

4. Handle Consistency and Failure Scenarios

Discuss how to reconcile discrepancies between cached availability and actual supplier inventory, such as overbooking prevention via optimistic locking or reservation holds. Define fallback strategies when suppliers are down (e.g., queue bookings, notify user).

5. Address Scalability and Monitoring

Explain how to scale the system horizontally, partition data by region or hotel, and monitor key metrics like cache hit rate, supplier latency, and booking success rate. Include alerting for supplier failures and automated recovery.

Key Points to Mention

  • Caching strategies (TTL, write-through, write-behind) and cache invalidation for availability data
  • Idempotency keys and exactly-once semantics for booking requests to prevent double bookings
  • Circuit breaker pattern and bulkhead isolation to handle unreliable supplier APIs
  • Saga pattern or two-phase commit with compensation for distributed transactions across suppliers
  • Eventual consistency trade-offs and how to communicate staleness to users (e.g., 'last updated' timestamp)
  • Monitoring and alerting for supplier health, booking success rates, and cache performance

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

Q2

How would you handle a supplier API going down mid-checkout when the user is about to confirm their booking?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

Went with a circuit breaker plus a graceful degradation message to the user, maybe surfacing a 'we're confirming availability' holding state.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scenario and requirements, then walk through a layered resilience strategy: immediate user experience, graceful degradation, and recovery. Emphasize idempotency, retries with backoff, and fallback mechanisms to avoid double bookings or lost revenue.

Pro tip: Mention that you would log the failure with enough context to replay the transaction later, and that you'd set up alerts to detect supplier API degradation before it impacts users. This shows you think about observability and proactive monitoring, not just reactive fixes.

1. Clarify the scenario and constraints

Ask questions to understand the criticality: is the booking confirmed already? What's the timeout? Are there alternative suppliers? This ensures your answer is tailored to the actual system.

2. Design for idempotency and retries

Ensure the booking request is idempotent so retries don't create duplicate bookings. Implement exponential backoff with jitter for transient failures.

3. Implement graceful degradation and fallbacks

If the supplier API is down, queue the request for later processing or switch to a backup supplier. Inform the user with a clear message and offer to notify them when the booking is confirmed.

4. Ensure data consistency and recovery

Use a transactional outbox or saga pattern to maintain consistency between your system and the supplier. Persist the intent to book so it can be retried or reconciled later.

5. Monitor, alert, and learn

Set up monitoring for supplier API health and alert on failures. After the incident, analyze logs to improve resilience and possibly renegotiate SLAs with the supplier.

Key Points to Mention

  • Idempotency keys to prevent duplicate bookings on retry
  • Retry with exponential backoff and circuit breaker patterns
  • Fallback to alternative suppliers or asynchronous processing
  • User experience: clear communication and status updates
  • Data consistency: transactional outbox or saga pattern
  • Observability: logging, monitoring, and alerting for supplier API health

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

Q3

How would you decide on TTL values for cached availability data?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business context: what availability data is being cached, how stale can it be, and what are the consequences of stale data? Then propose a TTL based on the data's volatility, the cost of cache misses, and the acceptable staleness, and explain how you would validate and adjust it over time.

Pro tip: Mention that TTL is not just a technical parameter but a business decision—align it with product requirements and SLAs, and consider using adaptive TTLs or event-driven invalidation for critical data.

1. Clarify requirements and constraints

Ask about the data source, update frequency, read/write patterns, and the cost of stale data (e.g., user experience, financial impact).

2. Analyze data volatility and access patterns

Determine how often the availability data changes and how frequently it is read. High volatility and high read rates may require shorter TTLs or invalidation strategies.

3. Evaluate trade-offs

Balance freshness against cache hit ratio, backend load, and latency. Consider the impact of stale data on business metrics and user trust.

4. Propose and justify a TTL

Suggest a specific TTL (e.g., 1 minute, 5 minutes) based on the analysis, and explain how it meets the requirements while optimizing performance.

5. Plan for monitoring and iteration

Describe how you would monitor cache hit rate, staleness, and backend load, and adjust the TTL as needed. Mention A/B testing or canary deployments if applicable.

Key Points to Mention

  • Data volatility: how frequently availability changes (e.g., real-time inventory vs. daily updates).
  • Business impact of stale data: potential lost sales, customer dissatisfaction, or regulatory issues.
  • Cache performance metrics: hit ratio, latency, and backend load reduction.
  • Alternative strategies: event-driven invalidation, write-through caching, or adaptive TTLs.
  • Monitoring and observability: tracking cache effectiveness and staleness to inform adjustments.
  • Trade-off between consistency and availability (CAP theorem) in the context of caching.

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

Q4

Two users are looking at the last available room at the same time. How do you prevent both from successfully booking it?

System DesignAlgorithms & Data Structures
Author's notes

Classic distributed concurrency problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: is this a single database or distributed system? Then explain that the core issue is a race condition, and propose a solution using atomic operations or locking. Finally, discuss trade-offs and how to handle failures and scalability.

Pro tip: Mention that you would use a database transaction with SELECT FOR UPDATE or a unique constraint, and highlight that optimistic locking with versioning is often better for high-throughput systems. Also, note that you should consider idempotency keys to handle retries safely.

1. Clarify requirements and constraints

Ask about the system architecture (single DB vs distributed), expected load, and consistency requirements. This shows you don't jump to solutions prematurely.

2. Identify the race condition

Explain that without safeguards, both users could read 'available' and then both write 'booked', leading to double booking. This is a classic concurrency issue.

3. Propose concurrency control mechanisms

Discuss options like pessimistic locking (SELECT FOR UPDATE), optimistic locking (version numbers), atomic conditional updates (UPDATE ... WHERE available = true), or unique constraints. Mention distributed locks if needed.

4. Handle failures and edge cases

Address what happens if a lock is held too long, or if a transaction fails. Suggest timeouts, retries with idempotency, and monitoring.

5. Discuss trade-offs and scalability

Compare approaches: pessimistic locking can hurt throughput, optimistic locking may cause retries, atomic updates are efficient but limited. Choose based on context.

Key Points to Mention

  • Race condition and double booking
  • Database transactions and ACID properties
  • Pessimistic vs optimistic locking
  • Atomic conditional updates (e.g., UPDATE ... WHERE)
  • Distributed locking (e.g., Redis, ZooKeeper) for microservices
  • Idempotency and retry handling
  • Trade-offs: performance, consistency, scalability

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

Q5

How would you monitor for stale availability data being shown to users, and track failed booking confirmations?

System DesignProduct Analytics & Metrics
Author's notes

Talked about logging the delta between cached availability and supplier confirmation responses, then alerting when the mismatch rate crosses a threshold.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the user-facing impact and the data flow from inventory sources to the booking UI. Then propose a layered monitoring strategy: freshness SLAs with alerting on staleness, and a separate funnel for booking confirmation failures with root-cause breakdowns. Tie both to actionable dashboards and automated remediation where possible.

Pro tip: Define freshness as a measurable SLA (e.g., 'availability data must be < 30s old') and alert on burn rate rather than a single threshold to avoid noisy pages. For failed confirmations, instrument idempotency keys and retry outcomes so you can distinguish transient failures from systemic issues.

1. Clarify scope and data flow

Ask clarifying questions about what 'stale' means (time threshold, user impact) and trace the pipeline from inventory source to UI. Identify where delays or failures can occur.

2. Define freshness SLAs and metrics

Establish a maximum acceptable age for availability data and compute a freshness lag metric (e.g., p50/p95/p99 age). Monitor the percentage of requests served with data older than the SLA.

3. Instrument booking confirmation funnel

Track each step from user intent to confirmation, emitting events for success, failure, and latency. Segment failures by error type, payment method, inventory source, and retry attempts.

4. Set up alerting and dashboards

Create alerts on freshness SLA violations and confirmation failure rate spikes, using burn-rate or anomaly detection. Build dashboards showing trends, top failure reasons, and affected user segments.

5. Close the loop with remediation

Automate fallbacks (e.g., serve cached data with a warning, retry with backoff) and create runbooks for on-call. Feed insights back to engineering to fix root causes.

Key Points to Mention

  • Freshness SLA definition and measurement (e.g., data age percentiles)
  • End-to-end tracing with correlation IDs to link UI, API, and data pipeline
  • Booking funnel instrumentation with success/failure events and error categorization
  • Alerting on burn rate or anomaly detection to reduce noise
  • Dashboards segmented by user impact, device, and inventory source
  • Automated remediation and fallback strategies (e.g., stale-while-revalidate, retries with idempotency)

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

Q6

How would your design change specifically for last-minute bookings in high-demand cities during peak periods?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

This one was fun.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scenario: last-minute bookings in high-demand cities during peak periods, where the main challenges are contention, latency, and fairness. Then, propose design changes that prioritize availability, consistency, and scalability, such as dynamic pricing, queueing, and geo-distributed caching. Finally, discuss trade-offs and how you would validate the solution with metrics and experiments.

Pro tip: Emphasize the importance of defining clear SLOs for peak scenarios and designing for graceful degradation—this shows you think about reliability under stress, not just features.

1. Clarify requirements and constraints

Ask questions to understand the scale (e.g., requests per second, number of cities), consistency needs (e.g., can we oversell?), and business goals (e.g., maximize revenue vs. fairness).

2. Identify bottlenecks and failure modes

Analyze how the current design would fail under last-minute, high-demand conditions—e.g., database contention, cache stampedes, or race conditions in booking.

3. Propose architectural changes

Suggest modifications like read/write separation, sharding by city, using a queue to serialize bookings, implementing optimistic concurrency control, and adding a waiting list or lottery system.

4. Address trade-offs and alternatives

Discuss trade-offs between consistency and availability, latency and accuracy, and fairness and revenue. Mention CAP theorem implications and how to choose based on business priorities.

5. Define validation and monitoring

Outline how you would test the design (load testing, chaos engineering) and monitor it in production (SLOs, alerts on latency and error rates).

Key Points to Mention

  • Dynamic pricing or surge pricing to manage demand
  • Queueing or rate limiting to prevent overload
  • Geo-distributed caching and CDN for static content
  • Database sharding and read replicas for scalability
  • Optimistic vs. pessimistic locking for booking consistency
  • Graceful degradation and fallback mechanisms (e.g., waiting list)

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