45
Debugging Microservices Phil Calçado h6p://philcalcado.com @pcalcado

Debugging Microservices

Embed Size (px)

Citation preview

Page 1: Debugging Microservices

Debugging MicroservicesPhil Calçado h6p://philcalcado.com @pcalcado

Page 2: Debugging Microservices
Page 3: Debugging Microservices

The story so far…

Page 4: Debugging Microservices

Your typical architecture circa 2001

Page 5: Debugging Microservices

As business become more tech-aware…

Page 6: Debugging Microservices

AIer dropping the users table for the 5th Kme…

Page 7: Debugging Microservices

And we kept breaking them down…

Page 8: Debugging Microservices

Debugging Mono and Microliths

Page 9: Debugging Microservices

One way to go about it

Page 10: Debugging Microservices

1.Write a new test with the reproducKon steps

2.See that test fail 3.Change the code to fix it 4.See that test pass 5.Run all unit tests

My favorite way to go about it

Page 11: Debugging Microservices

5. Run all tests?

Page 12: Debugging Microservices

Debugging Microservices

Page 13: Debugging Microservices

1. Find the relevant “virtual circuit”

Page 14: Debugging Microservices

2. Bring up the right components

Page 15: Debugging Microservices

1.Write a new test with the reproducKon steps

2.See that test fail 3.Change the code to fix it 4.See that test pass 5.Run all unit tests

3. Test

Page 16: Debugging Microservices

But the whole is greater than the sum of its parts.

Page 17: Debugging Microservices
Page 18: Debugging Microservices

The plaYorm ma6ers

Page 19: Debugging Microservices
Page 20: Debugging Microservices

So how do we go about it?

Page 21: Debugging Microservices

OpKon 1) Observability

Page 22: Debugging Microservices

Sorry, that’s all I had.

!

Page 23: Debugging Microservices

Observability circa 2010

Page 24: Debugging Microservices

AlerKngTimeouts

This is your code on microservices

Biz Logic

Timeouts

Telemetry

AuthorizaKon

Client-side Service Discovery

Page 25: Debugging Microservices

~25% of engineering Kme was dealing with cross-cucng aspects

Page 26: Debugging Microservices

Observability circa 2016

Page 27: Debugging Microservices

Each service has a manifest

Page 28: Debugging Microservices
Page 29: Debugging Microservices

~10 engineers working on tooling

full-Kme

Page 30: Debugging Microservices

required a standardized

development stack

Page 31: Debugging Microservices

Observability these days

Page 32: Debugging Microservices

A lot of this is available at the network level

Page 33: Debugging Microservices

• Who you are • Where you are located geographically • Who you need to talk to • Your average availability • Your security constraints • …

A lot of this is already available to the infrastructure

Page 34: Debugging Microservices

We need a smart network that

leverages this data.

Page 35: Debugging Microservices
Page 36: Debugging Microservices
Page 37: Debugging Microservices
Page 38: Debugging Microservices

h6p://philcalcado.com/2017/08/03/pa6ern_service_mesh.html

Page 39: Debugging Microservices

OpKon 1) Service Proxy

Page 40: Debugging Microservices
Page 41: Debugging Microservices

OpKon 2) Sidecars

Page 42: Debugging Microservices
Page 43: Debugging Microservices

Early 2010s => ad-hoc code

Mid 2010s => smart build pipelines

Late 2010s => smart networks

Page 44: Debugging Microservices

Debuggability and simplicity aren’t reasons to adopt

microservices

Page 45: Debugging Microservices

Q&A