The Other Kind of Distributed System

17
The Other Kind of Distributed System Rafael Schloming [email protected]

Transcript of The Other Kind of Distributed System

Page 1: The Other Kind of Distributed System

The Other Kind of Distributed System

Rafael [email protected]

Page 2: The Other Kind of Distributed System

● Founded in 2014● Spoken with dozens of organizations that have adopted

microservices at scale● Just hosted our Microservices Practitioner Summit with

speakers from Uber, Netflix, Facebook, Yelp, HubSpot, New Relic, and others -- check out videos online at microservices.com

● NodeJS is ubiquitous as a microservices framework as part of these orgs

Page 3: The Other Kind of Distributed System

Some problems are obviously distributed● Streaming video (Netflix)● Dispatching drivers (Uber)● Global pub/sub (Twitter)

The nature of the problem demands a distributed solution.

Page 4: The Other Kind of Distributed System

What if the problem isn’t inherently distributed...● Pet Shop● CMS● ...

But you need 1000 developers all working on the same codebase.

Page 5: The Other Kind of Distributed System

This is the world we live in today

● Software is eating the world...● Businesses live or die on their ability to quickly and

continuously deliver and adapt massive software platforms

Systems are becoming distributed not (only) because of the nature of the problem, but because of the nature of those solving it.

Page 6: The Other Kind of Distributed System

Microservices (Continuously Herding Distributed Cats)

Distributed Development

Distributed S

ystems

Microservices

Continuous U

ptime

Page 7: The Other Kind of Distributed System

Continuous Uptime Distributed Systems● Mechanical Failure● Distance

The system needs to continue to function despite the failure of any individual component.

The system needs to continue to function despite stale or unavailable information.

● Challenging, but many well known patterns exist

Page 8: The Other Kind of Distributed System

Distributed Development

● Coordination is impossible● Unintended consequences cause bugs

Small cross functional teams operating independently to deliver discrete parts that function together as a whole.

● Well defined APIs between parts● Strong versioning discipline● Strict overarching release cadence● Strong testing discipline

Page 9: The Other Kind of Distributed System

Distributed Development of Cont. Uptime Distributed Systems● Humans are the primary source of failures● Coordination is still impossible● APIs are distorted by distance● Dynamic factors are difficult to simulate● Testing is a harder

This changes the way we work.

● This requires a new methodology and a new set of tools.

Page 10: The Other Kind of Distributed System

Microservices Methodology

● Make it easier to predict consequences of change○ Smaller Changes

○ Frequent Deploys

○ Stronger versioning

○ Explicit Contracts

● Make it easier to recover from unintended consequence○ Visibility

○ Rollbacks/Fixes

○ Isolation

Page 11: The Other Kind of Distributed System

Methodology -> Tooling

● Change in unit of abstraction: library -> service● Abstractions are now expressed as contracts between

services

Page 12: The Other Kind of Distributed System

Dynamic languages in microservices● Yesterday:

○ Refactor rails/django/flask/nodejs monolith -> Java● Today:

○ Extend rails/django/flask/nodejs monolith with polyglot services

● Shift in language balance○ Strong typing within a language doesn’t help as much

Page 13: The Other Kind of Distributed System

What’s needed for microservices?● Quickly apply/rollback a small change

○ DevOps best practices (e.g., CD)

● Service Isolation● Service Availability

Page 14: The Other Kind of Distributed System

Building service isolation & avail

● Service isolation○ timeouts

○ defaults

○ circuit breakers

● Service availability○ dynamic load balancing

○ back pressure

Needs to be deployed in every service

Page 15: The Other Kind of Distributed System

Datawire Connect: isolation and availability across services

● 100% Open Source, Apache Software License

● Quark IDL○ Describe your API

● Datawire Connect library automatically integrates service isolation and availability○ client side load balancing○ timeouts○ circuit breakers○ backpressure (coming soon)○ context propagation (coming soon)○ rpc, async, eventing

● Quark DSL permits extending the DC library with additional behaviors● Support for NodeJS, Python, Java, (Ruby coming soon)

Page 16: The Other Kind of Distributed System

Demo

Page 17: The Other Kind of Distributed System

Summary

● Microservices requires service isolation and availability

● Building this from scratch is hard, but we make it easy

○ https://github.com/datawire/datawire-connect

○ Give us feedback (GitHub, Slack, email)

● Lots more information on microservices online at microservices.com, including videos

[email protected]

Distributed Development

Distributed S

ystems

Microservices

Continuous U

ptime