55
My journey through microservices so far… Phil Calçado h:p://philcalcado.com @pcalcado

My journey through microservices so far…

Embed Size (px)

Citation preview

Page 1: My journey through microservices so far…

My journey through microservices so far…

Phil Calçado h:p://philcalcado.com @pcalcado

Page 2: My journey through microservices so far…
Page 3: My journey through microservices so far…

Zeroth IteraBon: ThoughtWorks

Page 4: My journey through microservices so far…

What the client’s architect oGen wanted

WebSphere

Monolith.ear

Page 5: My journey through microservices so far…

Tomcat

TomcatTomcat

TomcatTomcat

TomcatTomcat

Tomcat

What we wanted to build

.war .war .war .war

.war .war .war .war

Page 6: My journey through microservices so far…

What we oGen built

.jar .jar .jar .jar

.jar .jar .jar

WebSphere

.jar

Page 7: My journey through microservices so far…

First IteraBon: SoundCloud

Page 8: My journey through microservices so far…

Small European company fighBng the giants of the music industry.

Page 9: My journey through microservices so far…

"We used to deliver features at light-speed, growing the team has slowed us down!"

Page 10: My journey through microservices so far…

Old value chain

Page 11: My journey through microservices so far…

Amongst other changes

Page 12: My journey through microservices so far…

New value chain

Page 13: My journey through microservices so far…

h:p://philcalcado.com/2015/09/08/how_we_ended_up_with_microservices.html

Page 14: My journey through microservices so far…

Second IteraBon: DigitalOcean

Page 15: My journey through microservices so far…

Small New York startup fighBng the giants of cloud compuBng.

Page 16: My journey through microservices so far…

"We know exactly what we need to deliver. All we need is to hire more people."

Page 17: My journey through microservices so far…

No new product in years.

Page 18: My journey through microservices so far…

! "

#

Control Panel Group Internal Tools Group

Back-end Group

Page 19: My journey through microservices so far…

Control Panel Microlith Internal Tools Microlith

Back-end Microlith

Page 20: My journey through microservices so far…

Amongst other changes

Page 21: My journey through microservices so far…
Page 22: My journey through microservices so far…

In Conclusion

Page 23: My journey through microservices so far…

Engineering is the bo:leneck

Legal/Product is the bo:leneck

Page 24: My journey through microservices so far…

Engineering is the bo:leneck

Legal/Product is the bo:leneck

Page 25: My journey through microservices so far…

Fin.

Page 26: My journey through microservices so far…

…or is it?

Page 27: My journey through microservices so far…

server

client

Page 28: My journey through microservices so far…

server

client

🔥 🔥 🔥

Page 29: My journey through microservices so far…
Page 30: My journey through microservices so far…

🔥

wait

☺😰

🔥 🔥

wait

☺ 😰

🔥

Page 31: My journey through microservices so far…

server

client client client client client client

Page 32: My journey through microservices so far…

🔥

wait

☺😰

🔥 🔥

wait

☺ 😰

🔥

Page 33: My journey through microservices so far…

🔥

wait

☺ 😰

🔥 🔥

wait

😰 ☺

🔥 🔥

wait

😰 ☺

🔥 🔥

wait

😰 ☺

🔥 🔥

Page 34: My journey through microservices so far…

🔥

🗑

Page 35: My journey through microservices so far…

"I know, let’s have all circuit breakers share state”

Page 36: My journey through microservices so far…

"I know, let’s have all circuit breakers share state”

Answer to the question “how did my application ended up importing a Zookeeper library again?"

Page 37: My journey through microservices so far…

server

client

🔥 🔥 🔥server server serverserver

🔥 🔥 🔥 💩

🤔

Which instance should we talk to?

Page 38: My journey through microservices so far…

DNS be like…

*

Page 39: My journey through microservices so far…

Circuit breakersTimeouts

This is your code on microservices

Biz Logic

Timeouts

Telemetry

Distributed state

Client-side Service Discovery

Page 40: My journey through microservices so far…

The dirty li:le secret no microservices

evangelist tell you:

Page 41: My journey through microservices so far…

Google/SoundCloud/Twi:er/Nedlix/Facebook/etc. have more

engineers working on their internal tooling than the total number of employees at your workplace.

Page 42: My journey through microservices so far…

i.e. microservices are complicated af

Page 43: My journey through microservices so far…

Third IteraBon: Buoyant

Page 44: My journey through microservices so far…

Circuit breakers

Timeouts

Biz Logic

Timeouts

Telemetry

RPC code

Distributed state

Client-side Service Discovery

SDK

Historically, this complicaBon leaks into your service

Page 45: My journey through microservices so far…

Sidecars to the rescue

Circuit breakers

Timeouts

Biz Logic

Timeouts

Telemetry

RPC code

Distributed state

Client-side Service Discovery

SCARY OUTSIDE WORLD

Page 46: My journey through microservices so far…

Sidecars to the rescue

Circuit breakers

Timeouts

Biz Logic

Timeouts

Telemetry

RPC code

Distributed state

Client-side Service Discovery

SCARY OUTSIDE WORLDSidecar

Page 47: My journey through microservices so far…

Sidecars form their own network

Page 48: My journey through microservices so far…

ApplicaBon

Transport

Internet

Network

Circuit breakers

Telemetry

RPC code

Distributed state

Client-side Service Discovery

} TCP/IP

} ?

One way to think about it

Page 49: My journey through microservices so far…
Page 50: My journey through microservices so far…

Two examples of Service Mesh

• All-in-one • ProducBon ready

• Next-generaBon • For Kubernetes

Page 51: My journey through microservices so far…

It’s not that these pa:erns aren’t used anymore, it’s just that the

dumb work moved down the stack.

Page 52: My journey through microservices so far…

New, optmised, protocols are quite opaque (e.g. gRPC and friends)

Works be:er with metadata-rich protocols

Page 53: My journey through microservices so far…

It makes it even harder to fully replicate producBon earlier in the development cycle

Coupled to the pladorm

Page 54: My journey through microservices so far…

Not everything will be part of the mesh, i.e. the network sBll isn’t homogeneous

Leaky abstracBon

Page 55: My journey through microservices so far…

Q&A