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
November 29, 20260
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
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- 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 ProblemsSample 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...