how soundcloud scales...¥alexa ranking (233) ¥ employees (190) - 80 engineers ¥ 4 office...

67
How SoundCloud scales Alexander Grosse @klangberater Freitag, 5. April 13

Upload: others

Post on 08-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

How SoundCloud scalesAlexander Grosse

@klangberater

Freitag, 5. April 13

Page 2: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

“Youtube for Audio”

Freitag, 5. April 13

Page 3: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Fakten

Freitag, 5. April 13

Page 4: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Alexa Ranking (233)

Fakten

Freitag, 5. April 13

Page 5: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Alexa Ranking (233)• Employees (190) - 80 engineers

Fakten

Freitag, 5. April 13

Page 6: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Alexa Ranking (233)• Employees (190) - 80 engineers• 4 office locations (Berlin, London, San Francisco,

Sofia)

Fakten

Freitag, 5. April 13

Page 7: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Alexa Ranking (233)• Employees (190) - 80 engineers• 4 office locations (Berlin, London, San Francisco,

Sofia)• >35 million registered users

Fakten

Freitag, 5. April 13

Page 8: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Alexa Ranking (233)• Employees (190) - 80 engineers• 4 office locations (Berlin, London, San Francisco,

Sofia)• >35 million registered users• partners (BBC, CNN)

Fakten

Freitag, 5. April 13

Page 9: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Alexa Ranking (233)• Employees (190) - 80 engineers• 4 office locations (Berlin, London, San Francisco,

Sofia)• >35 million registered users• partners (BBC, CNN)• > 10.000 Apps

Fakten

Freitag, 5. April 13

Page 10: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Freitag, 5. April 13

Page 11: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

How SoundCloud scales

Freitag, 5. April 13

Page 12: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

?Freitag, 5. April 13

Page 13: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Organization

Technology

Freitag, 5. April 13

Page 14: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

What is the foundation?

Freitag, 5. April 13

Page 15: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Freitag, 5. April 13

Page 16: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Principles

Freitag, 5. April 13

Page 17: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Top-Down vs. Bottom-Up

Principles

Freitag, 5. April 13

Page 18: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Top-Down vs. Bottom-Up

Trust

Principles

Freitag, 5. April 13

Page 19: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Top-Down vs. Bottom-Up

Trust

How to react to mistakes

Principles

Freitag, 5. April 13

Page 20: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Top-Down vs. Bottom-Up

Trust

How to react to mistakes

Continuous Improvement

Principles

Freitag, 5. April 13

Page 21: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Top-Down vs. Bottom-Up

Trust

How to react to mistakes

Continuous Improvement

Innovation

Principles

Freitag, 5. April 13

Page 22: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Flat Hierarchies? Everybody has them...

• Engineering teams responsible for architecture (not architecture teams)

• Influence on the product

Top-Down vs. Bottom-Up

Freitag, 5. April 13

Page 23: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Deployment

• Change Management

• Process

• Time for “technical debt”

Trust

Freitag, 5. April 13

Page 24: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• What will be changed if a mistake happens?

Reaction to mistakes

Freitag, 5. April 13

Page 25: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• R&D Department?

• Only Product?

Innovation

Freitag, 5. April 13

Page 26: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 27: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• No dedicated QA roles

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 28: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• No dedicated QA roles

• “You build it - you run it”

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 29: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• No dedicated QA roles

• “You build it - you run it”

• Team Building (Rotation, constant changes)

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 30: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• No dedicated QA roles

• “You build it - you run it”

• Team Building (Rotation, constant changes)

• Hacker Time

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 31: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• No dedicated QA roles

• “You build it - you run it”

• Team Building (Rotation, constant changes)

• Hacker Time

• Continuous Improvement

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 32: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• No dedicated QA roles

• “You build it - you run it”

• Team Building (Rotation, constant changes)

• Hacker Time

• Continuous Improvement

• Move fast and break things

SoundCloud‘s basic principles

Freitag, 5. April 13

Page 33: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

No QADoes that mean we don‘t test?

Freitag, 5. April 13

Page 34: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

“You build it - you run it”

Freitag, 5. April 13

Page 35: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Flat Hierarchy

Freitag, 5. April 13

Page 36: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Innovation

Hacker Time

Freitag, 5. April 13

Page 37: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Freitag, 5. April 13

Page 38: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Continuous Improvement

RetrospectivesPost Mortems (Projekte)

Freitag, 5. April 13

Page 39: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Mistakes...

Freitag, 5. April 13

Page 40: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Scrum? Kanban?Process?

Freitag, 5. April 13

Page 41: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

What is the most important thing you have to do so that this works?

Freitag, 5. April 13

Page 42: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Freitag, 5. April 13

Page 43: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

???

Freitag, 5. April 13

Page 44: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

???

Initial Culture

Freitag, 5. April 13

Page 45: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

???

Initial Culture

Hiring!!!

Freitag, 5. April 13

Page 46: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Freitag, 5. April 13

Page 47: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

SoundCloud Hiring Process

Freitag, 5. April 13

Page 48: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

How does it look like in reality?

Freitag, 5. April 13

Page 49: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Organisation

Freitag, 5. April 13

Page 50: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

HTML5 Mobile (native) other V1

System Engineering (Berlin / SF)

Search T&S Payment Partner Tools

Data Activ. Delivery Platform

API

Freitag, 5. April 13

Page 51: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

How do we structure teams?

cross functional?

Freitag, 5. April 13

Page 52: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Do teams stay the same?

Change!

Freitag, 5. April 13

Page 53: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Technology

Freitag, 5. April 13

Page 54: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Ruby/Scala/Go/Clojure/Javascript

Freitag, 5. April 13

Page 55: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Scale Horizontally/Vertically?

Freitag, 5. April 13

Page 57: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• 7 Master, 9 slaves, 900GB data

• Additional slaves in EC2

• Master Peak is 15K IOPS writes, 45k reads

• one slave lags intentionally 1 hour behind

• Je nach Konsistenzanforderung wird Slave oder Master gewählt (für reads - unterstützt read-only mode)

MySQL

Freitag, 5. April 13

Page 58: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• 3 Cluster

• 88 Nodes

• 15 TB of data

• up to 70K reads/sec

Cassandra

Freitag, 5. April 13

Page 59: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

HadoopElastic Search

Proprietary Spam Detection

Freitag, 5. April 13

Page 60: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

ElasticSearch

80 Mio Docs (gaining 1 Mio every 6 days)

175 QPS (gaining 15 QPS every month)

Freitag, 5. April 13

Page 61: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Hosted in S3/EC2and physical DCs

Freitag, 5. April 13

Page 62: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Outages

Freitag, 5. April 13

Page 63: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Freitag, 5. April 13

Page 64: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Post Mortems

Freitag, 5. April 13

Page 65: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

• Move fast and break things

• Don‘t get slow because you fear to make mistakes

Summary

Freitag, 5. April 13

Page 66: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

backstage.soundcloud.com

Freitag, 5. April 13

Page 67: How SoundCloud scales...¥Alexa Ranking (233) ¥ Employees (190) - 80 engineers ¥ 4 office locations (Berlin, London, San Francisco, Sofia) ¥ >35 million registered users Fakten

Alexander Grosse

alexandergrosse.com@klangberater

We are hiring!

www.soundcloud.com/jobs

Freitag, 5. April 13