Shazam to move its GPUs to Google Cloud Platform
Music recognition app can now scale up and down, and not have to worry about hardware failures
Shazam will move its GPUs (graphics processing units) to the Google Cloud Platform to enable it to scale up its server fleet to cope with an increasing demand from consumers on the music recognition app.
The company has used GPUs for music recognition since 2012. It was able to maximise recognition throughput by putting GPU cards like the NVIDIA Tesla K10 or the K80 on a single server.
"These GPUs work well because when you Shazam a song, what you actually send us is a fingerprint of the audio that your device recorded. We use that fingerprint to search for matching songs across all of our catalogue, which is a very intensive operation," Jesus Roncero said in a Shazam blogpost.
The company creates fingerprints of all the songs it has in its catalogue, compiles them into custom databases that then loads onto each of its GPUs' memory, and then performs searches on them.
The demand for song recognition is increasing and the company now matches 20 million songs per day. To meet that demand, Shazam has been maintaining a fleet of GPUs on dedicated bare metal servers that it leases from a managed services provider.
Ben Belchak, head of site reliability engineering at Shazam, explained that because of the time it takes to source and provision a new physical server, the company provisions enough to meet peak demand and then runs that capacity 24/7, 365 days a year.
"We kept costs under control by improving our algorithms and by taking advantage of ever-evolving GPU architectures and the performance improvements they brought," he said in a separate blog post.
However, about six months ago, Shazam began experimenting with GPUs running on Compute Engine.
"We've traditionally used bare metal servers because GPUs in the cloud have not been available, and when they have, they were far too expensive and not performant enough for our needs. Only recently have the economics of GPUs in the cloud really made sense for our business," Belchak said.
"Thanks to the speed with which we can dial new instances up and down, we maintain GPU infrastructure to handle average use instead of the full capacity for our maximum peak load. Thus far, we've migrated about one-third of our infrastructure into Google Cloud," he added.
The aim is for Shazam to run much more efficiently. Prior to switching its GPUs to Google, the company had to provision servers to meet specific demands. This was fine when the company could plan for events like the Superbowl or Eurovision, but if a specific song or event becomes one of the most-searched items unexpectedly it has proved difficult to keep up with demand.
"Migration to the cloud has been an exciting challenge for our development and SRE teams," said Roncero.
"Now we have a much more dynamic setup where we can add and reduce capacity much more quickly, software deploys and data reloads are faster and we don't have to spend our time dealing with hardware failures," he added.