Why Shazam is shifting its GPUs to Google Cloud

Concert crowd

Shazam is moving all its cloud GPUs to Google Cloud Platform (GCP) so it can scale up and scale down more easily than was possible with bare metal servers.

The company said it's been using GPUs (graphics processing units) since 2012 because it found that was a more effective way of processing the high volume of recognition requests it received every minute.

"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," site reliability engineer Jesus Roncero said.

In 2012, there was no alternative to bare metal, Ben Belchak, head of site reliability engineering at Shazam, added. The cloud technology that was available at the time was too expensive for the number of requests users were putting through and the cloud didn't have the same performance as it does now.

However, because the number of people using the platform is growing at such a pace, using bare metal servers leased from a managed service provider no longer has the flexibility of cloud services, which can scale up and down much more dynamically.

So the company started on its journey to migrate to GCP, which makes it much faster to identify a song using 'tiers' of searches. If a well-known track is searched for, it will find it on a first tier search, for example, But if it's a less well-known track, it will take more tiered searches to find it.

To make this work best, the tiers of servers always need to be updated according to what's most popular. For example, if an old song is suddenly used for a TV show, it needs to work its way back up the priority list, fast.

Bare metal didn't allow for this quick adaptation, because Shazam only bought the capacity it needed for everyday running, not for surges in traffic when the index shifted, as well as adding new music all the time. Shazam's IT team also needed to account for failures.

"One of the amazing benefits of running in Google is that we can now replace a failed node in just minutes with a brand new one 'off the shelf', instead of keeping a pool of nodes around just waiting for failures," Belchak said.

He also said it allows Shazam to increase how often it can update its audio signature database. This used to happen once a day on bare metal servers. It can now happen in under an hour with Google, so it's always up to date.

"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," Belchak added.

Clare Hopping
Freelance writer

Clare is the founder of Blue Cactus Digital, a digital marketing company that helps ethical and sustainability-focused businesses grow their customer base.

Prior to becoming a marketer, Clare was a journalist, working at a range of mobile device-focused outlets including Know Your Mobile before moving into freelance life.

As a freelance writer, she drew on her expertise in mobility to write features and guides for ITPro, as well as regularly writing news stories on a wide range of topics.