Design an Instant Freight Quote Service for Ocean Shipments

Last updated: November 29, 2026

Quick Overview

Design the service behind an instant quote: a shipper enters origin, destination, cargo details and ready date, and receives several priced options (carriers, routings, service levels) in under two seconds, with prices that hold for a validity window.

Flexport
System Design
Software Engineer
Flexport
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the service behind an instant quote: a shipper enters origin, destination, cargo details and ready date, and receives several priced options (carriers, routings, service levels) in under two seconds, with prices that hold for a validity window.

Quoting is where a digital forwarder like Flexport wins or loses the booking, and freight pricing is a mix of contract rate cards, spot rates and dozens of surcharges. The interviewer checks that you model pricing data sensibly, keep the latency budget, and make quotes reproducible and honored at booking time.

What the Interviewer Expects
  • Clarify inputs (port or door, FCL or LCL, container types, hazmat) and outputs
  • Model rate cards, surcharges and accessorials with effective dates
  • Show how a quote request fans out and stays under a latency budget
  • Persist an immutable quote snapshot that booking references
  • Discuss margin rules and how pricing changes are rolled out safely
Key Topics to Cover
Pricing Engine
Rate Management
Caching
Immutable Snapshots
Latency Budgets
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you price door-to-door when the trucking leg comes from a third-party API that is slow?
  • Fuel surcharges change weekly. How do you make sure open quotes keep their price?
  • How would you test a new margin model on a slice of quotes?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Input: origin and destination (port or address), cargo (FCL container count and type, or LCL weight and volume), ready date, commodity flags. Output: 3 to 6 options with total price, breakdown, transi...

High-Level Design
  • Rate store: Postgres tables for contracted ocean rates by lane, carrier, container type and effective date range; surcharges (BAF, peak season, terminal handling) as rules keyed by lane and date...

Submit Your Answer
Markdown supported

Related Questions