Project Overview
| Client Industry | Logistics / Freight Marketplace |
| Business Type | Digital marketplace connecting small shippers with independent owner-operator truckers |
| Project Duration | 16 weeks |
| AI Service Provided | Product Scaling and Optimization |
| Technologies Used | React, Node.js, PostgreSQL, Redis, Elasticsearch, AWS (ECS, RDS, ElastiCache), Terraform, Datadog |
The Client Challenge
The client’s freight-matching marketplace had grown from a regional pilot to a platform processing thousands of shipment bookings a month success that was starting to break the product built for a much smaller scale.
The strain points as growth accelerated:
- Search and matching the core feature connecting shippers with available truckers slowed from under a second to 8–12 seconds as trucker and shipment volume grew, directly hurting booking conversion.
- The database, a single PostgreSQL instance handling both transactional bookings and complex search queries, was increasingly the bottleneck, with slow queries during peak hours occasionally timing out entirely.
- The mobile app used by truckers to find and accept loads had a growing crash rate as concurrent usage increased, particularly during high-demand periods (holiday shipping season).
- Real-time load tracking, a feature shippers relied on, lagged during peak hours as the underlying data pipeline couldn’t keep up with concurrent updates from thousands of active shipments.
- The founding engineering team, while talented, had built the original product for a regional pilot and hadn’t had bandwidth to address scaling issues while also shipping new features investors expected.
- Booking conversion rate had noticeably declined over two consecutive quarters, and the product team suspected performance was a meaningful contributing factor but lacked the bandwidth to isolate and fix it while maintaining feature velocity.
Our Solution
Air Brite Labs conducted a focused performance and architecture audit to identify exactly where the platform was breaking under load, then re-architected the highest-impact bottlenecks search, database load distribution, and real-time tracking without disrupting the product’s existing feature roadmap or requiring a full rewrite.
Key improvements delivered:
- Dedicated search infrastructure — moved load-matching search off the primary transactional database and onto a purpose-built Elasticsearch index, restoring sub-second search performance regardless of trucker/shipment volume.
- Database read/write separation — introduced read replicas to separate reporting and search-adjacent queries from the transactional booking path, eliminating the contention that caused peak-hour slowdowns.
- Real-time tracking pipeline rebuild — re-architected the load tracking data flow to handle high-concurrency updates without lag, using a message queue to decouple location updates from the tracking display layer.
- Mobile app stability fixes — identified and resolved the specific conditions causing trucker app crashes under concurrent load, largely tied to unoptimized state management during high-frequency location updates.
- Caching layer expansion — extended Redis caching to cover frequently accessed shipment and trucker availability data, reducing unnecessary database load across the board.
- Infrastructure auto-scaling — moved from fixed-capacity servers to auto-scaling AWS ECS, so the platform could absorb seasonal demand spikes (like the holiday shipping surge that had previously caused crashes) without manual intervention.
Technical Approach
Search Architecture: Extracted load-matching search from PostgreSQL into a dedicated Elasticsearch cluster, with a synchronization pipeline keeping the search index current with booking and availability changes in near real-time eliminating the query complexity that had been degrading the primary database’s performance.
Database Scaling: Introduced PostgreSQL read replicas to offload reporting and analytics queries from the primary transactional database, combined with query optimization on the highest-frequency booking-path queries identified through Datadog’s query performance monitoring.
Real-Time Tracking: Rebuilt the load tracking pipeline using a message queue (Amazon SQS) to decouple high-frequency trucker location updates from the tracking display layer, preventing update volume spikes from degrading the shipper-facing tracking experience.
Caching Strategy: Expanded Redis (via AWS ElastiCache) to cache shipment listings, trucker availability, and frequently queried marketplace data, significantly reducing direct database load for read-heavy operations.
Mobile App Optimization: Profiled the React Native trucker app under simulated high-concurrency conditions, identifying inefficient state re-renders triggered by frequent location updates as the primary crash cause, and refactored the state management approach to handle high-frequency updates without instability.
Infrastructure: Migrated from fixed-capacity EC2 instances to auto-scaling AWS ECS, with infrastructure changes codified in Terraform for repeatable, version-controlled scaling configuration.
Observability: Datadog deployed across the application and infrastructure layers to give the team ongoing visibility into performance bottlenecks as they emerge, rather than discovering them reactively through user complaints.
Implementation Process
- Discovery & Requirement Analysis (Weeks 1–3): Conducted a performance audit under real production load, using Datadog profiling to identify the specific queries, endpoints, and mobile app conditions causing the most significant slowdowns and crashes.
- Prototype / PoC (Weeks 4–5): Built a proof-of-concept Elasticsearch search implementation and validated performance improvement against a copy of real production search query patterns.
- Development (Weeks 6–11): Built the full Elasticsearch migration, implemented database read replicas, rebuilt the real-time tracking pipeline, and refactored the mobile app’s state management.
- Integration (Weeks 12–13): Integrated the new search infrastructure and tracking pipeline into the live platform behind feature flags, allowing controlled rollout.
- Testing (Week 14): Load-tested the updated platform against traffic volumes matching the prior holiday season’s peak demand, validating that the performance and stability issues from the previous year were resolved.
- Deployment (Week 15): Rolled out the improvements progressively using feature flags, monitoring each component’s impact before full cutover.
- Optimization (Week 16 and ongoing): Fine-tuned auto-scaling thresholds and cache expiration policies based on real post-launch traffic patterns.
Key Features Delivered
- Dedicated Elasticsearch-based search infrastructure for load matching
- Database read replica architecture separating transactional and reporting workloads
- Rebuilt real-time load tracking pipeline handling high-concurrency updates
- Mobile app stability fixes resolving the primary crash conditions under load
- Expanded Redis caching layer across marketplace data
- Auto-scaling AWS infrastructure replacing fixed-capacity servers
- Comprehensive performance monitoring and alerting via Datadog
Business Results
- Load search response time dropped from 8–12 seconds to under 400 milliseconds at peak volume
- Platform successfully handled 60,000+ monthly bookings, a 12x increase from the 5,000/month volume the original architecture was built for, without a full rebuild
- Trucker mobile app crash rate dropped by approximately 85% during high-concurrency periods
- Booking conversion rate improved measurably following the search and performance fixes, recovering the decline seen over the prior two quarters
- The platform handled the following holiday shipping season’s peak demand without incident, compared to stability issues the prior year
- Database-related production incidents dropped significantly, freeing the engineering team to focus on feature development instead of firefighting performance issues
Technology Stack
| Layer | Technology |
|---|---|
| Frontend / Mobile | React, React Native |
| Backend | Node.js |
| Database | PostgreSQL (with read replicas) |
| Search | Elasticsearch |
| Caching | Redis (AWS ElastiCache) |
| Messaging | Amazon SQS |
| Infrastructure as Code | Terraform |
| Cloud Infrastructure | AWS ECS, RDS |
| Monitoring | Datadog |
Why the Solution Worked
The engagement succeeded because it started with data, not assumptions. Profiling real production traffic under Datadog before making any architectural changes meant engineering effort went directly toward the bottlenecks actually causing conversion loss and app crashes, rather than a broad, unfocused “modernize everything” effort.
Rolling changes out behind feature flags, component by component, also mattered it let the team validate real-world impact and catch issues early without risking a disruptive full-platform change to a marketplace with active, revenue-generating traffic. Fixing the architecture that had outgrown its original scale, without discarding the product decisions that were already working, kept the engagement focused and fast.
Future Scalability
The scaling work establishes a foundation for continued growth, with the client now planning:
- Extending the Elasticsearch infrastructure to support more sophisticated matching algorithms as marketplace complexity grows
- Adding predictive demand forecasting using the now-reliable real-time tracking and booking data
- Expanding auto-scaling infrastructure to support planned geographic expansion into new regional markets
- Applying the same performance monitoring discipline established with Datadog to proactively catch future bottlenecks before they affect users
Because the search, database, and tracking layers are now decoupled and independently scalable, future growth can be absorbed by scaling the specific component under strain rather than requiring another platform-wide intervention.
Final Outcome
The marketplace platform now handles more than 10x its original booking volume with faster search, fewer crashes, and no full rewrite required. What had become a growth-limiting bottleneck is now infrastructure built to support the company’s continued scale, giving the engineering team room to focus on new features instead of firefighting performance.


