Microservices for the rest of us

29
Microservices for the rest of us Lessons you can (safely) ignore from Netflix, Amazon, and other unicorns

Transcript of Microservices for the rest of us

Page 1: Microservices for the rest of us

Microservices for the rest of usLessons you can (safely) ignore from Netflix, Amazon, and other unicorns

Page 2: Microservices for the rest of us

datawire.io 2

Page 3: Microservices for the rest of us

datawire.io 3

Amazon, 2008

Page 4: Microservices for the rest of us

Hailo, 2014

Page 5: Microservices for the rest of us

Netflix

Page 6: Microservices for the rest of us

What do you need if you’re building the Death Star?

Page 7: Microservices for the rest of us

Use the Force.

Page 8: Microservices for the rest of us

What’s the Force?

backpressure rate limiting retries timeouts asynchronous RPC asynchronous one way messaging

circuit breakers service discovery code packaging continuous deployment scheduling …

Page 9: Microservices for the rest of us
Page 10: Microservices for the rest of us

I don’t need The Force to build my

microservices architecture!

Page 11: Microservices for the rest of us

Adopting Microservices

Chewbecca The Force

Number of services at Uber over time

Page 12: Microservices for the rest of us

Microservices = Service Oriented Development

Developer happiness, not architecture

(Google “smiling developers”)

Experiment and iterate

(don’t try to do all your design upfront)

Page 13: Microservices for the rest of us
Page 14: Microservices for the rest of us

Make microservices cheap — the developer workflow

Code a microservice Test the microservice Run and deploy the microservice Integration test Debug

Page 15: Microservices for the rest of us

Code

You can use a plain ol’ webapp for the most part. HTTP and JSON are Good Enough (tm).

Test

Test your webapp / RESTful APIs using your standard testing tools.

Page 16: Microservices for the rest of us

Run and Deploy

Continuous deployment is critical for rapid iteration Docker on Mesos, k8s is the trendy standard EC2 works, too!

Page 17: Microservices for the rest of us

Integration Testing

Complete Integration testing before production requires massive investment in complex CI/CD Minimize the impact of a bug blowing up production

Page 18: Microservices for the rest of us

Debugging

Find and fix problems quickly Integration bugs are the hardest to root cause

Page 19: Microservices for the rest of us

Make microservices cheap — the developer workflow

Code a microservice Test the microservice Run and deploy the microservice Integration test Debug

Page 20: Microservices for the rest of us

One more thing …

Page 21: Microservices for the rest of us

Topology: the way constituent parts are interrelated or arranged.

Page 22: Microservices for the rest of us

Traditionally, architects defined topology.

Page 23: Microservices for the rest of us

Traditional Topology Management

Client

DNS

LB

Server

Server

ServerRouting table is (relatively) static. Routing policy is global.

resolve

traffic

Page 24: Microservices for the rest of us

Now, developers can define topologies.

Page 25: Microservices for the rest of us

Load Balancing

Client

Discovery Service

Service

ServiceRouting table is realtime. Routing policy is local.

routes

traffic

heartbeats

Smart endpoint

Page 26: Microservices for the rest of us

Data Processing

Store

Discovery

Transform

Transform

Ingest

Ingest

Ingest

Page 27: Microservices for the rest of us

Summary

Build topologies: Service discovery and routing Code / test: Webapp framework, HTTP, JSON Run and deploy: Continuous deployment pipeline Integration test: Software resilience or hard core CI Debugging: logging

Page 28: Microservices for the rest of us

Demo

Page 29: Microservices for the rest of us

datawire.io 29

https://www.datawire.io https://www.datawire.io/careers/

Questions [email protected]

@rdli