How much is Spotify paying Google Cloud?

David Mytton
4 min readMar 7, 2016

Two weeks ago, Spotify announced it was migrating from its own datacentres to Google Cloud Platform.

This is a huge win from Google because Spotify is the first major service running at huge scale that is deploying across many of its cloud products (and talking about it). We all know that Snapchat has been running on Google for a while, but since it is primarily on App Engine, Google needed a credible use case for its other services. Now it has one. This is similar to AWS’s Netflix.

Spotify is gradually revealing the numbers behind its decision to move to the cloud, further strengthening the case for “why Google?”. However, they are missing a major evaluation criteria: cost.

Thankfully, Google’s pricing is very transparent and simple to work with, so we can use Spotify’s blog posts to calculate some list pricing for what Spotify might be paying Google.

Event Delivery

So far, event delivery is the only service we have real numbers for. Spotify was previously using Kafka in its own data centres but has decided to move to Google Pub/Sub.

Google pricing

Google’s Pub/Sub pricing is based on 3 key variables:

  • Operations. Every API call is an operation and one “event” will consume at least 3 API calls: publish, push/pull to the consumer and an acknowledge. This assumes the message is 64KB or less.
  • Networking. If you are using Pub/Sub within a single region then there’s no networking cost, but if there’s communication to another region then you pay the standard networking fees.
  • Storage. Messages are stored until acknowledged, which can be for up to 7 days.

Spotify’s numbers

Based on Spotify’s blog post, we can extract the following numbers:

  • Operations. Spotify’s average production workload is 700,000 events per second. During their test, they used a number of 2,000,000 events per second to stress the system and allow for future growth, but it’s fairer to use their actual quoted production workload figures.
  • Networking. Spotify’s test was in a single zone so the networking costs are $0. However, if we assume…

--

--

David Mytton

Co-founder https://console.dev — the best tools for developers. Researching sustainable computing at Uptime Institute. https://davidmytton.blog