How MakeMyTrip achieved millisecond personalization at scale with Databricks

Sitesh Sharma, Aditya Kumar, Navneeth Nair7 Apr 2026

Problem

MakeMyTrip, India's largest online travel agency, shows a "last-searched hotels" list when a user taps the search bar. The list must be personalized from the user's recent interactions and appear at once, for millions of daily users across consumer (B2C) and corporate (B2B) travel. Spark micro-batch mode stayed at one to two seconds of latency despite extensive tuning. Even a few hundred milliseconds of delay hurts click-through rate.

Example from the article: a traveler taps the search bar and expects a real-time list of hotels based on their recent interactions with the app.

Solution in brief

Run the whole pipeline on Spark Structured Streaming in Real-Time Mode (RTM), enabled by one trigger setting, instead of adding Apache Flink. B2C and B2B Kafka topics are unioned into one stream, each event looks up the user's last N hotels in Aerospike, and the result is pushed to a Redis UI cache.

Questions this case answers
  • How to serve per-user personalized state from an event stream within a tens-of-milliseconds budget while keeping a single engine and codebase for batch and streaming
  • How to cut the compute cost of a continuous low-latency stream that by default needs one processing slot per input partition
  • How to show a user a personalized list of recently searched items within tens of milliseconds of a tap
  • How to get sub-second streaming latency without adding a second streaming engine next to the batch stack

Tools and methods

  • Spark Structured Streaming Real-Time Mode (RTM) — continuous low-latency execution in Spark; replaces micro-batches
  • Apache Kafka — B2C and B2B clickstream topics (64 partitions in production)
  • Aerospike — low-latency lookup of the user's last N hotels
  • Redis — UI cache that serves the result to the app
  • Apache Flink — evaluated on about 10 pipelines and rejected as a second engine
Continue reading — it's free

Google or a one-time email code. No password.