← Amazon Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Amazon for a software engineering role. The prompt was a full pricing engine for a ride-hailing platform, which sounds scoped until you realize they want carpooling logic, fairness constraints, experimentation hooks, and real-time updates all in one go. Dense question, not a lot of hand-holding.

Questions Asked (1)

Q1

Design and implement a pricing engine for a ride-hailing platform. The system should return multiple candidate routes via an API, compute prices per route using factors like distance, duration, supply/demand, wait time, and driver incentives, support carpooling with shared-segment pricing, enforce fairness constraints like surge caps and neighborhood equity, allow pricing experimentation, and handle real-time demand and driver availability updates. Include a high-level architecture and core price calculation code.

System DesignPricing & MonetizationA/B Testing & Experimentation
Author's notes

This one ate up the whole session.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a high-level architecture that separates concerns: route generation, pricing computation, real-time data ingestion, experimentation, and fairness enforcement. Dive into the core pricing algorithm, explaining how factors combine and how carpooling and fairness are handled, and finally discuss scalability and trade-offs.

Pro tip: Emphasize idempotency and auditability in pricing calculations, as pricing changes can have legal and customer trust implications. Also, mention how you would A/B test pricing changes safely with guardrail metrics.

1. Clarify Requirements and Scope

Ask questions to understand functional and non-functional requirements: expected scale, latency, fairness constraints, experimentation needs, and integration points. Define key metrics like price accuracy, system availability, and experiment velocity.

2. High-Level Architecture

Propose a microservices-based architecture with separate services for route generation, pricing, real-time supply/demand tracking, experimentation, and fairness enforcement. Use event-driven updates for real-time data and a rules engine for dynamic pricing factors.

3. Core Pricing Algorithm

Design a modular pricing function that computes base price from distance and duration, applies multipliers for supply/demand and wait time, adds driver incentives, and adjusts for carpooling by splitting shared segments. Enforce fairness via caps and equity adjustments.

4. Experimentation and Fairness

Describe how to support A/B tests for pricing strategies using feature flags and experiment assignment. Explain how fairness constraints (surge caps, neighborhood equity) are enforced as guardrails and monitored.

5. Scalability and Trade-offs

Discuss scaling the system for high throughput and low latency, using caching, sharding, and async processing. Address trade-offs between accuracy, latency, and fairness, and how to handle failures gracefully.

Key Points to Mention

  • Separation of concerns: route generation, pricing, real-time data, experimentation, and fairness as distinct services.
  • Pricing formula: base fare + distance*rate + duration*rate, then apply multipliers (surge, wait time) and add incentives.
  • Carpooling: identify shared segments and split costs fairly among riders, considering detours and time.
  • Fairness: implement surge caps per area, neighborhood equity adjustments, and transparency in pricing.
  • Experimentation: use feature flags, A/B testing framework, and guardrail metrics to avoid harming users.
  • Real-time updates: use streaming (e.g., Kafka) for supply/demand and driver availability, with low-latency pricing API.

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