Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Developer-first workflows (for
microservices) on Kubernetes
Richard Li
datawire.io
● Building a cloud application using
microservices in 2013
● Distributed systems engineers
● Multiple services...
datawire.io
Part 1: How do I gain the
benefits of microservices?
(How do I break up my monolith?)
(How do I architect my a...
datawire.io 4
Stability/Maturity
Velocity
Prototype Production Mission critical
datawire.io 5
Stability/Maturity
Velocity
Prototype Production Mission critical
datawire.io
How do I break up my monolithic architecture?
How do I break up my monolithic process into
multiple independen...
datawire.io 7
Define
Code
Test
Release
Prod
datawire.io 8
Define
Code
Test
Release
Prod
Centralized process
● Specialized teams
● Fixed policies (e.g.,
release criter...
datawire.io 9
Microservices lets you run multiple processes!
datawire.io 10
Industrial Revolution.
datawire.io
Microservices is a distributed
development architecture
workflow.
11
datawire.io 12
Stability/Maturity
Velocity
Prototype Production Mission critical
● How do I get to Continuous Deployment i...
datawire.io
Microservices is ...
● Multiple workflows
○ Including your existing workflow!
○ Workflows designed for differe...
datawire.io
Doing things this way shifts how people operate!
● Specialists become generalists → design better holistic sys...
datawire.io
Part 2: How do I create multiple,
simultaneous workflows?
15
datawire.io
Create self-sufficient, autonomous
software teams.
16
datawire.io
Why self-sufficiency and autonomy?
● Self-sufficient
○ Team does not need to rely on other teams to achieve it...
datawire.io
Centralized specialist functions are a common barrier
to self-sufficiency and autonomy
18
Centralized architec...
datawire.io 19
datawire.io 20
Monolith
datawire.io 21
Monolith
(soon-to-be) self-sufficient,
autonomous team
datawire.io
I’m stranded on API island. Do I have to
build my workflow from scratch?
22
datawire.io
No! Kubernetes / Docker / Envoy give you the infra you
need
23
datawire.io
Docker
● A consistent build/runtime for your
service
● Run locally or in Kubernetes cluster
● Massive communit...
datawire.io
Kubernetes
● Cloud POSIX
● Declarative definition of your cloud
infrastructure
● Supported by all major vendor...
datawire.io
Envoy
● Modern L7 proxy, designed for cloud
applications
○ Resilience: global rate-limiting, circuit
breakers
...
datawire.io
Cloud Native Compute Foundation
27
● Istio
● SPIFFE
● App dev
datawire.io
Summary
1. Microservices is a distributed workflow: multiple & simultaneous processes.
2. Start building your ...
datawire.io
Part 3: How do I actually use these
technologies to build my workflow?
29
datawire.io 30
Monolith
Prototype new feature, FAST
datawire.io 31
Stage 1: Prototyping
Existing workflow: Designed for
mature app, not prototyping
Challenge: Prototyping wor...
datawire.io
Strategy: Dev infrastructure ~= Prod infrastructure
32
● End-to-end
○ Have developers access the service the s...
datawire.io
Strategy: Self-service operational infrastructure
33
Infrastructure needs to be configured by the service team...
datawire.io
Implementing Stage 1 strategies
● Eliminate environmental differences
○ Containerize your service and use the ...
datawire.io 35
Monolith
Now in production, and need to
ITERATE
datawire.io 36
Stage 2: Production users
Existing workflow: App-level
integration testing & roll out;
dedicated QA team; u...
datawire.io
Strategy: Multiple versions for software redundancy
37
End user
Primary version
Canary version
Dev version
datawire.io 38
Stage 3 Internal service consumption
Existing workflow: None
Challenge: Communicate to
consumers the servic...
datawire.io
● Define the target level of your service as part of your API
● Common SLOs relate to throughput, latency, and...
datawire.io
Strategy: Network level observability & resilience
● Observability
○ Figure out which service is causing the p...
datawire.io
Summary
1. Microservices is a distributed workflow.
2. Start building your distributed workflow by creating a ...
datawire.io
So how does this work in practice?
42
datawire.io
Your traditional monolith workflow ...
● Intended for iterative improvement & prevent downtime
○ Code locally ...
datawire.io
Versus microservice infrastructure & workflow ...
● Eliminate environmental differences
○ Container -- same ru...
datawire.io
Thank you!
● richard@datawire.io
● Getting ready to launch hands-on tutorials on building your own distributed...
END
Upcoming SlideShare
Loading in …5
×

Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on Kubernetes

464 views

Published on

This talk was presented at the Montreal Kubernetes Meetup on 11/8/17 by Richard Li from Datawire.

Published in: Software
  • Be the first to comment

Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on Kubernetes

  1. 1. Developer-first workflows (for microservices) on Kubernetes Richard Li
  2. 2. datawire.io ● Building a cloud application using microservices in 2013 ● Distributed systems engineers ● Multiple services ● Prototyping was really fast ● … then velocity slowed down by a lot when we started getting users and needing to add more features 2 Microservices at Datawire ...
  3. 3. datawire.io Part 1: How do I gain the benefits of microservices? (How do I break up my monolith?) (How do I architect my app with microservices?) (What infrastructure do I need in place before I can benefit from microservices?) 3
  4. 4. datawire.io 4 Stability/Maturity Velocity Prototype Production Mission critical
  5. 5. datawire.io 5 Stability/Maturity Velocity Prototype Production Mission critical
  6. 6. datawire.io How do I break up my monolithic architecture? How do I break up my monolithic process into multiple independent processes? 6
  7. 7. datawire.io 7 Define Code Test Release Prod
  8. 8. datawire.io 8 Define Code Test Release Prod Centralized process ● Specialized teams ● Fixed policies (e.g., release criteria)
  9. 9. datawire.io 9 Microservices lets you run multiple processes!
  10. 10. datawire.io 10 Industrial Revolution.
  11. 11. datawire.io Microservices is a distributed development architecture workflow. 11
  12. 12. datawire.io 12 Stability/Maturity Velocity Prototype Production Mission critical ● How do I get to Continuous Deployment incrementally? ● How do I limit the scope of PCI (audit process)? ● How do I ship feature X as fast as possible?
  13. 13. datawire.io Microservices is ... ● Multiple workflows ○ Including your existing workflow! ○ Workflows designed for different stability/velocity tradeoffs ● Simultaneous workflows 13
  14. 14. datawire.io Doing things this way shifts how people operate! ● Specialists become generalists → design better holistic systems ● Dev vs Ops vs QA → roadmap / API conversations ● Challenging for engineers → More fun! 14
  15. 15. datawire.io Part 2: How do I create multiple, simultaneous workflows? 15
  16. 16. datawire.io Create self-sufficient, autonomous software teams. 16
  17. 17. datawire.io Why self-sufficiency and autonomy? ● Self-sufficient ○ Team does not need to rely on other teams to achieve its goals ● Autonomy ○ Team is able to independently make (process) decisions on how to achieve its goals 17
  18. 18. datawire.io Centralized specialist functions are a common barrier to self-sufficiency and autonomy 18 Centralized architecture Centralized infrastructure / ops* (You might need a platform team, eventually)
  19. 19. datawire.io 19
  20. 20. datawire.io 20 Monolith
  21. 21. datawire.io 21 Monolith (soon-to-be) self-sufficient, autonomous team
  22. 22. datawire.io I’m stranded on API island. Do I have to build my workflow from scratch? 22
  23. 23. datawire.io No! Kubernetes / Docker / Envoy give you the infra you need 23
  24. 24. datawire.io Docker ● A consistent build/runtime for your service ● Run locally or in Kubernetes cluster ● Massive community & ecosystem ○ 14M Docker hosts ○ 3300+ contributors ○ Lots of third party tools 24
  25. 25. datawire.io Kubernetes ● Cloud POSIX ● Declarative definition of your cloud infrastructure ● Supported by all major vendors: Google, Microsoft, Mesos, Docker, Oracle, Red Hat, IBM all support it ● … except for Amazon. ○ Yet 62% of K8S workloads on AWS 25
  26. 26. datawire.io Envoy ● Modern L7 proxy, designed for cloud applications ○ Resilience: global rate-limiting, circuit breakers ○ APIs for managing fleets of Envoys ○ L7 observability (incl distributed tracing) ● Fast growing ecosystem & community ○ Maintained by Lyft ○ Google, IBM, Apple, Datawire, Verizon ○ CNCF project 26
  27. 27. datawire.io Cloud Native Compute Foundation 27 ● Istio ● SPIFFE ● App dev
  28. 28. datawire.io Summary 1. Microservices is a distributed workflow: multiple & simultaneous processes. 2. Start building your distributed workflow by creating a self-sufficient, autonomous team. 3. Kubernetes / Docker / Envoy give you the basic operational primitives you need. 28
  29. 29. datawire.io Part 3: How do I actually use these technologies to build my workflow? 29
  30. 30. datawire.io 30 Monolith Prototype new feature, FAST
  31. 31. datawire.io 31 Stage 1: Prototyping Existing workflow: Designed for mature app, not prototyping Challenge: Prototyping workflow that is fast but not one-off Strategies: ● Dev infra ~= Prod infra ● Self-service operational infrastructure
  32. 32. datawire.io Strategy: Dev infrastructure ~= Prod infrastructure 32 ● End-to-end ○ Have developers access the service the same way as end users (e.g., through an API Gateway, ingress, etc.) ● Environmental consistency ○ Insure that your dev runtime is the same as your initial production runtime ○ Environmental differences between dev & prod will cause bugs. So eliminate them upfront. Your dev infrastructure should resemble your production infrastructure as much as possible.
  33. 33. datawire.io Strategy: Self-service operational infrastructure 33 Infrastructure needs to be configured by the service team, not by operations (otherwise, there’s a bottleneck.) Service team needs to be able to publish new services, without operations. Service team has access to the Kubernetes manifest (maybe they use a standard template).
  34. 34. datawire.io Implementing Stage 1 strategies ● Eliminate environmental differences ○ Containerize your service and use the same container for dev & prod ○ Template your Kubernetes manifests so you can use the same manifest for dev & prod ● End-to-end ○ Use an API Gateway for dev and prod (you can even use the same one) ● Self-service operational infrastructure ○ Expose the right configuration options, in a rational way, for your infrastructure to the service team ■ Kubernetes manifest ■ Configuring your API Gateway 34
  35. 35. datawire.io 35 Monolith Now in production, and need to ITERATE
  36. 36. datawire.io 36 Stage 2: Production users Existing workflow: App-level integration testing & roll out; dedicated QA team; unit tests Challenge: Update service quickly, while not letting bugs impact the end user Strategies: ● Software redundancy
  37. 37. datawire.io Strategy: Multiple versions for software redundancy 37 End user Primary version Canary version Dev version
  38. 38. datawire.io 38 Stage 3 Internal service consumption Existing workflow: None Challenge: Communicate to consumers the service contract, and support that contract in the service Strategy: ● Service level objectives ● Network-level observability & resilience
  39. 39. datawire.io ● Define the target level of your service as part of your API ● Common SLOs relate to throughput, latency, and availability ○ This API will support up to 5,000 requests per second per consumer ○ The expected latency at p50, p90, p99 ● Simple implementation of SLOs can be via monitoring Strategy: Service level objectives 39
  40. 40. datawire.io Strategy: Network level observability & resilience ● Observability ○ Figure out which service is causing the problem ○ Need visibility at a network level ○ Distributed tracing (e.g., Jaeger, Zipkin) ● Resilience ○ Avoid cascade failure ○ Network-level rate limiting, circuit breaking, etc. ● Service mesh ○ Strategy for implementing network-level observability & resilience that’s transparent to end users ○ Istio just proposed to the CNCF 40
  41. 41. datawire.io Summary 1. Microservices is a distributed workflow. 2. Start building your distributed workflow by creating a self-sufficient, autonomous team. 3. Kubernetes / Docker / Envoy give you the basic operational primitives you need. 4. Your workflow requirements depend on your service maturity (prototype, production, internal dependencies). 5. Strategies for building your workflow a. Prototype: Dev ~= Prod, self-service operational infrastructure b. Production: Software redundancy c. Internal dependencies: Service level objectives, network-level observability/resilience 41
  42. 42. datawire.io So how does this work in practice? 42
  43. 43. datawire.io Your traditional monolith workflow ... ● Intended for iterative improvement & prevent downtime ○ Code locally in dev environment ○ Pull request ○ Branch for release ○ QA branch & integration test on staging environment ○ Release on production environment ● Different environments, specialized teams 43
  44. 44. datawire.io Versus microservice infrastructure & workflow ... ● Eliminate environmental differences ○ Container -- same run time environment ○ Kubernetes -- same deployment environment ● Self-service operational infrastructure ○ Templated Kubernetes manifest ○ Self-service API Gateway ● Multiple versions for software redundancy ○ Facilitated by API Gateway / router 44 Will let you prototype / launch / update a microservice with a workflow that’s tailored to feature development.
  45. 45. datawire.io Thank you! ● richard@datawire.io ● Getting ready to launch hands-on tutorials on building your own distributed workflow. If you’re interested in being notified, sign up here: ○ https://d6e.co/montrealk8s ● If you’re interested in any of our open source tools, check them out: ○ https://forge.sh for deployment ○ https://www.telepresence.io for real-time live coding ○ https://www.getambassador.io self-service API Gateway built on Envoy 45
  46. 46. END

×