The Challenge
The Solution
Case Study Highlights
Scale to meet massive demand
- Serve 12 million active users
- Make 40 million songs, albums and artists searchable
- Easily scale
Ensure an excellent customer experience
- Gain 10x faster query response
- Introduce real-time catalog updates
- Greatly improve search results
Enabling millions of searches per day
Deezer is a revolutionary global music service available in over 180 countries with 5 million paid subscribers and 12 million active users. Deezer provides music fans with unlimited access to a catalogue of 40 million tracks and thousands of radio channels, available on PC, laptop, tablet, smartphone, wireless home speakers, in-car audio, smart TVs and Xbox.
"At Deezer, we harness our passion for music and innovation to combine the best of man and machine, and to focus squarely on music discovery - anytime, anywhere and on any device," explains Julie Knibbe, Developer Advocacy Lead for Deezer.
"We strive to give artists access to a worldwide audience, helping them deepen their connection with fans and gain a level of exposure unparalleled by other music services."
"Millions of searches are performed daily on Deezer," Knibbe continues. "That's why search is at the core of Deezer, as it enables users to explore our catalog of 40 million tracks from our website, mobile apps and even through our API."
"Prior to Elasticsearch, search functionality on Deezer was in need of improvement," adds Antoine Sinton, Data Scientist at Deezer. "The platform we were using wasn't easily scalable, the response times were not as fast as desired - especially when we tried to improve the search results with the ability to allow for typos, for example."
Gaining 10x in search speed
Deezer replaced its previous platform with Elasticsearch as the main search for customers in 2014.
Elasticsearch is used by every Deezer user worldwide for all searches made through all platforms – web, API, apps, etc.
"Elasticsearch just fits," Sinton states. "It's incredibly flexible, so it was easy to integrate into our product architecture."
The ability to write low level plugins is considered one of the key flexibility advantages of Elasticsearch, according to Sinton. Deezer's entire catalog search is based on a plugin they wrote internally to access the strengths of Lucene to best fit their needs, while exploiting the strengths of Elasticsearch. The fact that a plugin can have such low level access to all phases of the engine was the final deciding factor towards using Elasticsearch.
Our catalog evolves all the time, so we need to be able to update in real time, and Elasticsearch delivers perfectly for our needs.
Once Elasticsearch was deployed, the company experienced a significant boost in search performance. In some cases, search query response times have decreased 10 fold.
"Search is at the center of users experience for finding tracks on our website," explains Antoine Sinton, Data Scientist at Deezer. "If the search results are slow and non-relevant, they may think about switching to another music service."
"We have millions of users worldwide, and it is very important that the predictive search field is fast," Knibbe concurs.
"Today, because of Elasticsearch, we are seeing response times as low as a few milliseconds."
"Using Elasticsearch, we've seen a 10 fold gain on some types of queries," adds Sinton, also pointing out that search results are much more relevant with Elasticsearch.
Seamlessly updating a catalog of 40 million tracks
The music catalog is updated all the time as Deezer continuously receives new material from record companies. Rapid updating of the data is also a mission-critical capability at Deezer, to keep the music catalog up to date at all times. "Our catalog evolves all the time, so we need to be able to update in real time, and Elasticsearch delivers perfectly for our needs," Sinton confirms.
Scalability to handle 12 million users and counting
With a growing active user base of 12 million people in over 180 countries, Deezer is always concerned with expansion, and the scalability required to handle that growth. As Deezer becomes available in more countries, more users and more songs will also follow, so scalability is a key factor.
"Scalability is very important," Sinton says. "We are constantly growing and we need to be able to add servers easily when we need extra power. Elasticsearch's integrated distributed system is perfectly suited for this kind of task."
Deezer's Elasticsearch deployment includes 11 nodes spread across five data centers. Each of these data centers contains a separate cluster.
"By enabling us to simply add a node and change online settings to add replication or distribution, Elasticsearch makes it extremely easy to make changes to our architecture to adapt to growth," adds Sinton.
Having an efficient search, like Elasticsearch, will make these developers more prone to using our service.
Gaining traction in the developer community
"Our aim is to build people's engagement with music through personal discovery," Knibbe explains. "In parallel we're in a constant search for innovation, opening up music discovery to developers in order to create a fun and engaging musical universe. With Elasticsearch, we are hoping to gain traction in the developer community."
"Elasticsearch will help Deezer gain traction in the developer community through our API, which helps developers integrate Deezer into their websites and mobile apps," Knibbe clarifies.
"Having an efficient search, like Elasticsearch, will make these developers more prone to using our service."
"We are providing artist, track and user search, with autocomplete to be able to provide suggestions on results as well," Knibbe concludes. "This is critical for the developer community as their challenge is often to match their base with ours. Since we now have a better support for fuzziness, we have seen better matching, which consequently improves the Deezer user experience."