what has soundcloud learnt about microservices?

53
What has SoundCloud microservices? learnt about Phil Calçado SoundCloud

Upload: phil-calcado

Post on 14-Jun-2015

1.802 views

Category:

Software


0 download

DESCRIPTION

Presentation: "What has SoundCloud learnt about Microservices?" Track: Monoliths & Microservices / Time: Friday 11:30 - 12:20 / Location: Hall 10 SoundCloud is the largest repository of audio on the web, used by more than 200 million people every month who upload more than 11 hours of audio every minute. Over the past few years we migrated from a typical monolithic architecture to microservices, and during this journey we found out what is real and what is hype about this buzzword. When does "the best tool for the job" break? What is available as open-source software and what will you have to build yourself? How to move from several deploys a day from dozens of deploys of dozens of different apps and keep sanity? How to deal with shared code bases? How does one even test all these moving parts? How big should a microservice be, anyway? In this talk, let's discuss the results of our discovery phase and what technologies, architecture patterns and processes we have adopted as our default toolbox. PHIL CALCADO, SOUNDCLOUD Phil Calcado Biography: Phil Calcado Phil Calçado is a Director of Engineering at SoundCloud, where he writes code and helps teams build a scalable and maintainable service. Before moving to Berlin, he spent four years as a Lead Consultant for ThoughtWorks, where he helped clients build systems in whatever crazy stack they had decided to use. Twitter: @pcalcado Blog: philcalcado.com http://gotocon.com/berlin-2014/presentation/What%20has%20SoundCloud%20learnt%20about%20Microservices?

TRANSCRIPT

Page 1: What has SoundCloud learnt about Microservices?

What has SoundCloud

microservices?

learnt about

Phil CalçadoSoundCloud

Page 2: What has SoundCloud learnt about Microservices?
Page 3: What has SoundCloud learnt about Microservices?
Page 4: What has SoundCloud learnt about Microservices?

>11 hours ofaudio uploaded every minute

Page 5: What has SoundCloud learnt about Microservices?

~300million peopleevery month

Page 6: What has SoundCloud learnt about Microservices?
Page 7: What has SoundCloud learnt about Microservices?

What we

2012-13did in

Page 8: What has SoundCloud learnt about Microservices?

SoundCloud.com

Page 9: What has SoundCloud learnt about Microservices?

Sounds ˝& Sets

Social Graph

Premium ˝Features Search

Activity Stream

API

Page 10: What has SoundCloud learnt about Microservices?

Sounds ˝& Sets

Social Graph

Premium ˝Features Search

Activity Stream

API

Page 11: What has SoundCloud learnt about Microservices?

api.soundcloud.com

iOS Android Desktop Widget 3rd Party

Page 12: What has SoundCloud learnt about Microservices?

api-mobile

iOS Android Desktop Widget

api web api-partn

3rd Party

Page 13: What has SoundCloud learnt about Microservices?

More details

http://bit.ly/dealing-with-the-monolith

Page 14: What has SoundCloud learnt about Microservices?

minimise

fixed costyour

per app

#1

Page 15: What has SoundCloud learnt about Microservices?

every new app answers

What language?

What I/O lib?What build system?

How do we deploy?What do we monitor?

Page 16: What has SoundCloud learnt about Microservices?

typical agile project

iteration 0 iteration 1 iteration 2 iteration 3 iteration 4

technical tasksuser stories

Page 17: What has SoundCloud learnt about Microservices?

typical microservices project

iteration 0 iteration 1 iteration 2 iteration 3 iteration 4

Page 18: What has SoundCloud learnt about Microservices?

You will have lots of microservices

Page 19: What has SoundCloud learnt about Microservices?

Consider having a “standard”, well-

supported and documented stack

Page 20: What has SoundCloud learnt about Microservices?

outsource

as possibleas much

#2

Page 21: What has SoundCloud learnt about Microservices?

micro service x-ray

infrastructure

app

Page 22: What has SoundCloud learnt about Microservices?

Avoid building as much ˝infrastructure as possible

Page 23: What has SoundCloud learnt about Microservices?

some good options

Page 24: What has SoundCloud learnt about Microservices?

Only infrastructure we need to build is the glue between the lib and our

quirks

Page 25: What has SoundCloud learnt about Microservices?

Avoid having quirks

Page 26: What has SoundCloud learnt about Microservices?

acknowledge

complexitythe new

#3

Page 27: What has SoundCloud learnt about Microservices?

user

likes

track

Page 28: What has SoundCloud learnt about Microservices?

user

likes

track

unit test

single process

run inside an IDE

typical app

Page 29: What has SoundCloud learnt about Microservices?

user

likes

track

integration test

multiple processes

stubs and fakes

microservice

Page 30: What has SoundCloud learnt about Microservices?

+ +

must be easy to provision

Page 31: What has SoundCloud learnt about Microservices?

make

visibleeverything

#4

Page 32: What has SoundCloud learnt about Microservices?
Page 33: What has SoundCloud learnt about Microservices?

make interactions visible

Page 34: What has SoundCloud learnt about Microservices?

standardised dashboards

Page 35: What has SoundCloud learnt about Microservices?

legacywrap your

stranglerswith

#5

Page 36: What has SoundCloud learnt about Microservices?

api-mobile

iOS Android Desktop Widget

api web api-partn

3rd Party

not exactly true

Page 37: What has SoundCloud learnt about Microservices?

iOS Android Desktop Widget 3rd Party

api.soundcloud.com

mothership still alive

api web api-partn

Page 38: What has SoundCloud learnt about Microservices?
Page 39: What has SoundCloud learnt about Microservices?

Client

api.soundcloud.com

Page 40: What has SoundCloud learnt about Microservices?

Client

strangler

api.soundcloud.com

Page 41: What has SoundCloud learnt about Microservices?

Client

strangler

api.soundcloud.com

Page 42: What has SoundCloud learnt about Microservices?

Client

strangler

api.soundcloud.com

Page 43: What has SoundCloud learnt about Microservices?

changedwhat changed

2013?since

Page 44: What has SoundCloud learnt about Microservices?
Page 45: What has SoundCloud learnt about Microservices?

babysitting

Rails

Stop

Page 46: What has SoundCloud learnt about Microservices?

Enable &

app devsempower☑

Page 47: What has SoundCloud learnt about Microservices?

“Experience

api?based” ☒

Page 48: What has SoundCloud learnt about Microservices?

comes

next?

What

Page 49: What has SoundCloud learnt about Microservices?

devicesmore

Page 50: What has SoundCloud learnt about Microservices?

based

RPC?

IDL

Page 51: What has SoundCloud learnt about Microservices?

test

environments

ephemeral

Page 52: What has SoundCloud learnt about Microservices?
Page 53: What has SoundCloud learnt about Microservices?

phil calçado

http://philcalcado.com˝@pcalcado˝

www.soundcloud.com˝