The problem is
in the journey.
Two people can be close on a map and still be a poor match for a shared ride.
A carpooling system has to consider the route, pickup and drop-off order, and the work it takes to evaluate each candidate. The backend also has to keep the trip coordinated once a match becomes a real journey.
Do the cheap
work first.
I used a four-tier route-corridor classification algorithm before making road-network queries. Filtering candidates earlier reduced the search space by over 85%, lowering the downstream routing workload.
As reported in my resume.
The important decision was where to spend computation: narrow the candidates first, then use road-network information for the remaining possibilities.
A smaller routing detail: pickup before drop-off +
Multi-stop pickup-and-delivery routing uses precedence constraints and precomputed distance matrices, enabling sub-millisecond route evaluations without repeated external API calls.
A ride keeps
moving.
Redis and BullMQ workers handle scheduled work, while Socket.IO supports live GPS, presence, and chat flows. Recurring commutes and notifications fit into the same broader coordination problem.
Stripe Connect supports payment holds and payouts. Together these parts turn a matching result into a journey people can actually take.
Measure the
system, too.
The backend served 700+ users. In Artillery load tests, measured P99 endpoint latency stayed below 100 ms; Prometheus and New Relic provided monitoring.
Spend the expensive work on the candidates that matter.