The Next Generation of Microservices Phil Calado - - PowerPoint PPT Presentation

the next generation of microservices
SMART_READER_LITE
LIVE PREVIEW

The Next Generation of Microservices Phil Calado - - PowerPoint PPT Presentation

The Next Generation of Microservices Phil Calado http://philcalcado.com @pcalcado We can think of microservices as highly distributed application architecture Highly distributed application architectures are just a flavor of distributed


slide-1
SLIDE 1

The Next Generation of Microservices

Phil Calçado http://philcalcado.com @pcalcado

slide-2
SLIDE 2
slide-3
SLIDE 3

highly distributed application architecture

We can think of microservices as

slide-4
SLIDE 4

Highly distributed application architectures are just a flavor of

distributed computing

slide-5
SLIDE 5

Technical Challenges Organization Challenges

Introducing distribution into your architecture brings up new

slide-6
SLIDE 6

Introducing distribution into your architecture brings up new

slide-7
SLIDE 7
slide-8
SLIDE 8

The example we will work with today:

Recovering from temporary failure

slide-9
SLIDE 9

Back in 2013…

slide-10
SLIDE 10
slide-11
SLIDE 11

"I know, let’s use microservices”

slide-12
SLIDE 12 Timeouts

Your code looks like this now

Biz Logic Timeouts
slide-13
SLIDE 13

server client

slide-14
SLIDE 14 Timeouts

Your code looks like this now

Biz Logic Timeouts RPC code
slide-15
SLIDE 15

server client 🔦 🔦 🔦

slide-16
SLIDE 16
slide-17
SLIDE 17

🔦

wait

☺ 😱

🔦 🔦

wait

☺ 😱

🔦

☺ ☺ ☺ ☺ ☺ ☺ ☺ ☺

slide-18
SLIDE 18

"I know, let’s implement circuit breakers and timeouts”

slide-19
SLIDE 19 Circuit breakers Timeouts

Your code looks like this now

Biz Logic Timeouts Telemetry RPC code
slide-20
SLIDE 20

server client client client client client client

slide-21
SLIDE 21

🔦

wait

☺ 😱

🔦 🔦

wait

☺ 😱

🔦

☺ ☺ ☺ ☺ ☺ ☺ ☺ ☺

slide-22
SLIDE 22

🔦

wait

☺ 😱

🔦

🔦

wait

😱 ☺

🔦

🔦

wait

😱 ☺

🔦

🔦

wait

😱 ☺

🔦

🔦

slide-23
SLIDE 23

🔦 🗒

slide-24
SLIDE 24

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

slide-25
SLIDE 25

"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?"

slide-26
SLIDE 26 Circuit breakers Timeouts

Your code looks like this now

Biz Logic Timeouts Telemetry RPC code Distributed state
slide-27
SLIDE 27

server client 🔦 🔦 🔦 server server server server 🔦 🔦 🔦 💪 🤕

Which instance should we talk to?

slide-28
SLIDE 28

DNS be like…

slide-29
SLIDE 29

"I know, let’s have clients keep track of healthy instances”

slide-30
SLIDE 30 Circuit breakers Timeouts

Your code looks like this now

Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery
slide-31
SLIDE 31

And that’s just for RPC reliability.

slide-32
SLIDE 32

What makes 2017 different?

slide-33
SLIDE 33

Experience reports Open-source software you can use

slide-34
SLIDE 34 Circuit breakers Timeouts Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery

SDK

slide-35
SLIDE 35 Application Transport Internet Network Circuit breakers Telemetry RPC code Distributed state Client-side Service Discovery

} TCP/IP } ?

One way to think about it

slide-36
SLIDE 36

But how does one go about adding a new layer to the TCP/IP stack?

slide-37
SLIDE 37

Sidecars to the rescue

Circuit breakers Timeouts Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery SCARY OUTSIDE WORLD
slide-38
SLIDE 38

Sidecars to the rescue

Circuit breakers Timeouts Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery SCARY OUTSIDE WORLD

Sidecar

slide-39
SLIDE 39

Sidecars to the rescue

slide-40
SLIDE 40
slide-41
SLIDE 41

How does that impact your service?

slide-42
SLIDE 42 Circuit breakers Timeouts Biz Logic Timeouts Telemetry RPC code Distributed state Client-side Service Discovery

Service Platform

slide-43
SLIDE 43 Biz Logic

Stability

Service Platform

slide-44
SLIDE 44
slide-45
SLIDE 45 Timeouts Biz Logic Stability

Service Platform

Capacity Security Availability
slide-46
SLIDE 46 Biz Logic

Service Platform

Service Mesh

slide-47
SLIDE 47

Allows our services to pretend some of those are true

slide-48
SLIDE 48

It’s not that these patterns aren’t used anymore, it’s just that the dumb work moved down the stack.

slide-49
SLIDE 49

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

Works better with metadata-rich protocols

slide-50
SLIDE 50

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

Coupled to the platform

slide-51
SLIDE 51

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

Leaky abstraction

slide-52
SLIDE 52

Q&A