Logistics & Freight

Global Freight Booking Platform on Azure Cosmos DB

Designing a globally distributed, multi-carrier freight booking platform that delivers real-time pricing and availability across 50+ shipping carriers with sub-100ms API response times.

AzureCosmos DB.NET 8MicroservicesLogisticsAPI
180ms
Average API response time (down from 1.2s)
78%
Cache hit rate for rate requests
50+
Carriers integrated
99.95%
Platform availability (multi-region)

The Challenge

The Challenge: Real-Time Multi-Carrier Pricing at Global Scale

The client operated a freight booking aggregator connecting shippers to over 50 global and regional carriers — ocean freight, air freight, and road freight. Each carrier had a different API, different data models, different rate structures, and different availability windows. Customer-facing pricing requests needed to aggregate rates from multiple carriers simultaneously, apply complex routing logic and surcharge calculations, and return within 1 second — otherwise conversion rates dropped sharply. The existing monolithic architecture on SQL Server could not scale to meet peak demand (Monday morning freight booking surge), had no caching strategy for carrier rate data, and was deployed in a single Azure region — creating both latency and resilience risks for a globally distributed customer base spanning Europe, Middle East, and Asia.

The Solution

Solution: Event-Driven Microservices with Cosmos DB and Azure Cache for Redis

Redesigned the platform using a microservices architecture with Cosmos DB as the primary database, Redis for hot-path caching, and Azure Service Bus for event-driven carrier integration.

1

Cosmos DB Data Model Design

Designed the Cosmos DB data model around the access patterns — not a normalised relational model. Carrier rate data, route configurations, and booking records are stored in partition-optimised containers with time-to-live (TTL) on rate data. Multi-region writes enabled active-active deployment across three Azure regions, delivering sub-50ms database latency for 95% of requests globally.

2

Carrier Integration Layer

Built a carrier adapter layer with a common interface for each of the 50+ carriers. Each adapter handles carrier-specific authentication, rate request formatting, response parsing, and error handling. Adapters run in parallel — a pricing request fans out to all relevant carriers simultaneously and aggregates responses within a 800ms timeout window, returning whichever carriers respond within the deadline.

3

Caching Architecture

Implemented a two-tier caching strategy: Azure Cache for Redis for hot pricing data (carrier rates valid for 15 minutes), and Cosmos DB's integrated cache for reference data (port codes, route definitions, currency rates). Cache hit rate for rate requests reached 78%, reducing carrier API calls and improving response time from 1.2s average to 180ms.

Technology Stack

Tools & Technologies Used

.NET 8C#ASP.NET CoreAzure Cosmos DBAzure Cache for RedisAzure Service BusAzure API ManagementAzure FunctionsDockerAKSAzure MonitorApplication InsightsSQL ServerAngular 17

Related Services

Services Used in This Project

Have a similar project?

Let's discuss your requirements. Book a free 30-minute consultation.

Book Free Consultation