The search engine must decide availability, price and order for millions of properties and trillions of room/date combinations.
If slow or inaccurate, it hurts latency, revenue and partner fairness.
The team solved it by: 👉 Generate offers at query time from compact rules instead of pre-computing catalogs. 👉 Run all data and the Pricing Engine in-process, keeping everything in RAM. 👉 Apply cheap ranking models first, then expensive ML models on a short shortlist.
The parts that matter: 1️⃣ Pricing Engine - evaluates 1,000+ declarative rules in microseconds per hotel 2️⃣ RocksDB - stores hotel data on each data node for fast key lookups
Search latency stays low while handling hundreds of thousands of requests per second and generating offers on demand.
Running a custom database gives low latency and full coverage but adds operational complexity such as replication, patching and consistency management. Nodes may drift a few seconds, so a search can briefly show a room that was just booked, relying on the booking step to guarantee final availability.
How do you balance the need for real-time offer generation with the operational overhead of a custom data store?