From Bus Stop Blues to Bliss: How redBus conquered the ETA challenge

Arushii Gupta
redbus India Blog
Published in
3 min readJan 2, 2024

Ever boarded an inter-city bus in India with anxiety gnawing at your stomach? “Am I at the right stop?” “Did I miss the bus?” “Is that honking my chariot or just another impatient beast?” Fear not, weary traveler, because redBus is here to slay your travel woes with the magic of live bus tracking and personalized ETAs!

But wait, providing ETAs isn’t a walk in the park. It’s a high-stakes game against unpredictable traffic gods and route-loving bus drivers. So, how did we outsmart them and conquer the ETA challenge?

The Early Days

We started with a self-graph model, meticulously plotting nodes along bus routes. This data-driven hero did well, but like a rookie hero, it stumbled against real-world chaos: traffic jams and detours threw its predictions off course.

The Villainous Obstacles

  • Delayed or inaccurate location data: Our hero needed accurate intel, but sometimes the data was late or lost its way.
  • Technical gremlins: Servers overloaded, communication lines clogged — our hero faced tech demons that threatened to derail its mission.

All this added up to a disappointing 50% ETA accuracy. We needed a superhero upgrade, stat!

Enter the ETA Avengers:

  1. XGBoost, the Predictive Powerhouse: Our secret sauce lies in the new model’s ability to factor in crucial variables that the traditional method missed. We’re talking:

1a. Real-time bus speed and trajectory: No more “averaging” based on static schedules. Our model tracks your bus’s actual movement, taking into account sudden stops, traffic lights, and even the driver’s skillful maneuvering!

1b. Grid congestion: Stuck in bumper-to-bumper traffic? We’ve got you covered. The model analyzes real-time traffic data to predict how long it will take your bus to navigate congested areas.

1c. Distance to the boarding point: This might seem obvious, but it’s a game-changer! Our model factors in the remaining distance to your stop, adjusting the ETA as the bus gets closer. No more waiting at the bus stop for an eternity!

1d. Temporal awareness: Day of the week and time of day matter! Our model learns from historical data to understand how traffic patterns change throughout the day and week. This means your ETA is tailored to the specific time you’re traveling, accounting for rush hour madness or weekend chill.

2. Arka, the Scalable Mastermind:

2a. Built for Speed and Scalability: Arka is built on a highly distributed and streaming system. This means that it can handle large amounts of data from GPS devices quickly and efficiently. Arka can process data directly from the device, without having to go through multiple layers of intermediaries. This reduces the number of “handshakes” between the layers, which can help to improve performance.

2b. Fault Tolerance and Scalability: Arka is built using Erlang’s actor model. This makes it fault-tolerant, concurrent, and scalable. This means that Arka can continue to operate even if there are failures in the system. It can also handle large increases in data volume without any problems.

3. 22,000+ Local Heroes: Forget generic predictions! Each boarding point gets its own custom-trained hero, because Mumbai traffic is a different beast than Chennai’s.Hosting & keeping these 22,000 heroes updated itself posed a major challenge. We ensured weekly retraining, under-a-minute deployment using Graviton process (this reduced the cost by 10%), employing a common Elastic File System for seamless collaboration and versioning for better tracking.

The Triumphant Result:

With these heroes by our side, we skyrocketed our ETA accuracy to a glorious 80+%! No more waiting in limbo, wondering if you’ll miss your bus or grow roots at the stop. You’ll know exactly when your ride arrives, leaving you free to relax, grab a chai, or even catch some zzz’s (travel naps are underrated).

Huge shout out to the entire team including (but not limited to) Data Scientists, Data Engineering, Tech, Operations & Product who have made this milestone possible!

But, at redBus, the journey continues! We’re constantly evolving, aiming for 100% accuracy and an even smoother boarding experience. If you have any bus travel woes, reach out to me on LinkedIn — your feedback fuels our mission to make your journeys stress-free and blissful!

--

--

Arushii Gupta
redbus India Blog
0 Followers
Writer for

Data freak. Proud daughter. Pet parent. Always up for an engaging conversation !