Search
Software and Technology

How Tinder® drives real-time recommendations across 190 countries with 4x lower CPU usage with Elastic

Millions of users served globally

Real-time recommendations across 190 countries and 45 languages

4x lower CPU usage

Reduction in infrastructure overhead for location-based discovery through geo-indexed search

47% lower scoring latency

Faster candidate ranking for real-time recommendations

Tinder® built its large-scale recommendation architecture on the open source search engine Elasticsearch, delivering personalized matches to millions of users across 190 countries with 4x lower CPU usage.

Summary

Tinder is one of the world's largest online dating platforms, ranking potential matches in milliseconds from tens of millions of profiles across 190 countries and 45 languages. To power that experience, Tinder built a large-scale recommendation architecture on the open source search engine Elasticsearch, developing several optimizations designed for high-volume workloads. By combining Elasticsearch with custom optimizations and infrastructure using ML, On top of Elasticsearch, Tinder's own optimizations delivered the gains: a custom Roaring bitmap exclusion filter improved filtering performance by 60%, and geo-indexed retrieval lowered CPU usage by four times. As a result, Tinder delivers personalized matches to millions of users around the world in milliseconds.

A complex system works to rank potential matches in milliseconds from tens of millions of profiles, considering each user's specific preferences, location constraints, and prior interactions, all to power an experience that has constantly evolved to better serve users' needs. Tinder is one of the world's largest online dating platforms, matching users who wish to meet people nearby. The app is straightforward: a user just needs to gesture to "LIKE" or "NOPE" a profile to indicate interest or to dismiss, respectively.

Operating at the speed and scale its users expect, Tinder built a large-scale recommendation architecture on the open source search engine Elasticsearch. To enhance profile retrieval, the first step in generating recommendations, Tinder has developed several optimizations for Elasticsearch designed for high-volume workloads. The app instantly filters candidates using machine learning (ML) and business logic to refine the list of matching candidates into the small set of customized profiles each user sees in the app.

"You can think of it as a funnel. We start with the corpus of all the users, and then we narrow that down through several stages to the handful of recommendations that you see in the application."

– Igor Sokolov, Staff Software Engineer, Tinder

By combining Elasticsearch with custom optimizations and infrastructure using ML, Tinder improved filtering performance by 60% with quicker responses as it lowered CPU usage by four times. As a result, Tinder meets its users' performance expectations, delivering personalized matches to millions of users around the world in milliseconds.

Opportunity: scaling real-time recommendations for millions of users

The simplicity of Tinder's interface masks a complex technical challenge. Every time Tinder shows recommendations, it must surface profiles from a massive pool of potential candidates. The process starts with "retrieval," the first step in a multistage recommendation engine. Tinder's engineering team needed infrastructure capable of quickly retrieving relevant candidate profiles across tens of millions of users in 190 countries and 45 languages, continuously adapting to changing user behavior while keeping infrastructure costs under control.

The system has to apply hard filters such as age, gender, and distance with further refinements that account for user preferences, delivering recommendations with extremely low latency.

"But applying only filters is not enough. In dense population areas, if we apply those filters, we still have hundreds of thousands of candidates."

– Igor Sokolov, Staff Software Engineer, Tinder

Tinder elected to integrate custom-trained ML models early in the retrieval stage. The efficiency of Tinder's retrieval capabilities determines speed, infrastructure cost, and the quality of recommendations for the steps that follow. "The major focus here is to quickly find a small subset of promising candidates," says Igor Sokolov. "We use Elasticsearch to power the retrieval."

Solution: building a multistage recommendation pipeline

Tinder hosts Elasticsearch on Amazon Elastic Kubernetes Service (Amazon EKS), using customized Elastic Cloud on Kubernetes. As a first step, its multistage recommendation pipeline reduces tens of millions of potential matches into a small set of roughly a thousand relevant profiles. Elasticsearch powers this retrieval stage, rapidly filtering candidates based on location, preferences, and profile signals while applying lightweight ML models to identify promising matches.

Retrieval powered by Elasticsearch

Tinder enhances retrieval by partitioning users into geo-indexes, meaning that Elasticsearch examines only nearby profiles instead of the entire global user base. As a result, Tinder dramatically reduces CPU usage and improves query latency while keeping recommendations highly relevant.

As an additional consideration, a typical Tinder user has already actioned around 10,000 profiles, while the heaviest users might have actioned as many as 70,000. Tinder built a custom Elasticsearch filter using Roaring bitmap technology, which helps to exclude the profiles that a user has already interacted with. The filter compresses the full exclusion list into a single object so that Elasticsearch doesn't have to go through tens of thousands of separate items to check if it should skip a profile before scoring.

Tinder further optimized its use of Elasticsearch by building a custom plugin that lets Java-based scoring logic run directly during retrieval. This gives Tinder the flexibility to dynamically load and test scoring models inside Elasticsearch while improving observability and development speed. The framework supports the conversion of Light Gradient Boosting Machine (LightGBM) models into highly optimized Java code that runs inside Elasticsearch for nuanced decision-making while cutting costs and improving latency.

To support these ML models at scale, Tinder optimized how Elasticsearch retrieves profile data. Instead of fetching features such as age, distance, and app history separately for every candidate profile, Tinder bundles them into a compact binary feature set. Accordingly, Elasticsearch can retrieve and process many features at once, significantly reducing latency and powering immediate recommendations for users.

After the retrieval stage using Elasticsearch, more advanced deep learning (DL) models running on GPUs outside the Elasticsearch infrastructure evaluate candidates and rank them using richer behavioral data, such as app history and engagement patterns. Finally, also outside Elasticsearch, Tinder applies reranking logic to balance recommendations and refine the user experience before delivering profiles to the app interface.

"If we do a really good job in retrieval, we don't actually need to run ranking for 10,000 candidates. By doing that, we can save quite significant cost for ranking infrastructure. And that creates a natural pressure on the quality of our retrieval."

– Igor Sokolov, Staff Software Engineer, Tinder
Retrieval, Ranking, Reranking

Outcome: accelerating recommendations by 47% with 4x lower CPU use

As a result of its customized optimizations within Elasticsearch, Tinder significantly reduces latency and drives real-time personalized recommendations at massive scale.

By building its recommendation infrastructure on Elasticsearch and extending it with custom ML optimizations, Tinder created a scalable platform for real-time matchmaking. By partitioning the user base into geo-indexes, Tinder lowered CPU usage by four times while enabling faster and more efficient location-based search. Additionally, Tinder boosted filtering performance by 60% through its use of Roaring bitmap technology to optimize large exclusion lists within Elasticsearch, meaning the system reduces the candidate pool sooner in the retrieval process.

Tinder continues to explore new ways to improve its recommendation pipeline, including newer vector search capabilities and the integration of additional ML models. As user behavior and AI models evolve, the company's architecture built on Elasticsearch provides a flexible foundation for experimentation and innovation.

While supporting matchmaking on a global scale, Tinder simultaneously offers personalized matches to each of its millions of users. Its system reduces feature extraction time by 84%, leading to 47% lower scoring latency during candidate ranking.

See how Elasticsearch powers real-time retrieval and ranking at scale, or start now with a free trial.

Topics: recommendation systems, candidate retrieval, real-time personalization, vector search, kNN, two-tower models, geo search, geo-indexing, Roaring bitmap exclusion, LightGBM scoring, machine learning ranking, low-latency search, high-scale search, Elasticsearch, Elastic Cloud on Kubernetes, Kubernetes, Amazon EKS