The Next Generation of Microservices — YOW 2017 Brisbane

  • Published on
    18-Mar-2018

  • View
    376

  • Download
    68

Embed Size (px)

Transcript

  • The Next Generation of Microservices

    Phil Caladohttp://philcalcado.com@pcalcado

  • highly distributed application architecture

    We can think of microservices as

  • Highly distributed application architectures are just a flavor of

    distributed computing

  • Technical Challenges

    Organization Challenges

    Introducing distribution into your architecture brings up new

  • Introducing distribution into your architecture brings up new

  • The example we will work with today:

    Recovering from temporary failure

  • Back in 2013

  • "I know, lets use microservices

  • Timeouts

    Your code looks like this now

    Biz Logic

    Timeouts

  • server

    client

  • Timeouts

    Your code looks like this now

    Biz Logic

    Timeouts

    RPC code

  • server

    client

  • wait

    wait

  • "I know, lets implement circuit breakers and timeouts

  • Circuit breakersTimeouts

    Your code looks like this now

    Biz Logic

    Timeouts

    Telemetry

    RPC code

  • server

    client client client client client client

  • wait

    wait

  • wait

    wait

    wait

    wait

  • "I know, lets have all circuit breakers share state

  • "I know, lets have all circuit breakers share state

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

  • Circuit breakersTimeouts

    Your code looks like this now

    Biz Logic

    Timeouts

    Telemetry

    RPC code

    Distributed state

  • "I know, lets have clients keep track of healthy instances

  • server

    client

    server server serverserver

    Which instance should we talk to?

  • DNS be like

    '

  • Circuit breakersTimeouts

    Your code looks like this now

    Biz Logic

    Timeouts

    Telemetry

    RPC code

    Distributed state

    Client-side Service Discovery

  • And thats just for RPC reliability.

  • What makes 2017 different?

  • Experience reports

    Open-source software you

    can use

  • Circuit breakers

    Timeouts

    Biz Logic

    Timeouts

    Telemetry

    RPC code

    Distributed state

    Client-side Service Discovery

    SDK

  • Application

    Transport

    Internet

    Network

    Circuit breakers

    Telemetry

    RPC code

    Distributed state

    Client-side Service Discovery

    } TCP/IP}?

    One way to think about it

  • But how does one go about adding a new layer

    to the TCP/IP stack?

  • Sidecars to the rescue

    Circuit breakers

    Timeouts

    Biz Logic

    Timeouts

    Telemetry

    RPC code

    Distributed state

    Client-side Service Discovery

    SCARY OUTSIDE WORLD

  • Sidecars to the rescue

    Circuit breakers

    Timeouts

    Biz Logic

    Timeouts

    Telemetry

    RPC code

    Distributed state

    Client-side Service Discovery

    SCARY OUTSIDE WORLDSidecar

  • Sidecars to the rescue

  • How does that impact your service?

  • Circuit breakers

    Timeouts

    Biz Logic

    Timeouts

    Telemetry

    RPC code

    Distributed state

    Client-side Service Discovery

    Service

    Platform

  • Biz Logic

    Stability

    Service

    Platform

  • Timeouts

    Biz Logic

    Stability

    Service

    Platform

    Capacity Security Availability

  • Biz LogicService

    Platform

    Service Mesh

  • Allows our services to pretend some of those are true

  • Its not that these patterns arent used anymore, its just that the

    dumb work moved down the stack.

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

    Works better with metadata-rich protocols

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

    Coupled to the platform

  • Not everything will be part of the mesh,i.e. the network still isnt homogeneous

    Leaky abstraction

  • Q&A

Recommended

View more >