SlideShare a Scribd company logo
1 of 92
Download to read offline
Building resilient microservices
with Kubernetes, Docker, and
Envoy
Phil Lombardi, Rafael Schloming, Richard Li, and Ed
Rousseau
datawire.io
Before we begin ...
● You’re running latest version of Docker on your laptop
● You’ve created an account on hub.docker.com
● You’ve downloaded some key Docker images
○ docker pull datawire/ambassador-envoy
○ docker pull prom/prometheus
○ docker pull python:3-alpine
● You’ve set up a working environment (we’ve pre-installed everything for you)
○ Ubuntu Docker image
○ git clone https://github.com/datawire/shopbox
○ cd shopbox
○ ./shopbox.sh
● You have your favorite terminal & text editor ready to go!
Go to the presentation here: https://d6e.co/2xQyXzN
2
datawire.io
About us
● Been working with microservices for past 2.5 years, both with our own cloud services
and with consulting
● We build open source tools for developers building microservices, based on our own
experiences
● Host microservices.com, which has talks from dozens of practitioners on
microservices
3
datawire.io
Introduction: Microservices,
Kubernetes, Docker, Envoy
20 minutes Presentation
Core Concepts of Docker &
Kubernetes
70 minutes Workshop
Break around 3pm 30 minutes
Building & deploying a
microservice in production
60 minutes Workshop
Wrap-up 20 minutes Presentation / Q&A
Feedback 5 minutes
Our schedule for today
4
datawire.io
Our focus today
1. Trying to communicate the key concepts
2. Minimize time spent on the mechanics, since they’re impossible to remember until
you do them often enough
3. Try to give you a mental model to understand the different (overwhelming) choices
in the Kubernetes ecosystem, and how to start.
4. If you don’t understand the purpose of a specific exercise, please ask!
Also …
Minikube is a popular choice for these trainings, since you can run things locally. But
minikube is a big performance hog and isn’t quite as realistic with some of the things
we’re doing, so we’re going to try to use the Internet. (We have done some work to
minimize bandwidth consumption.)
5
Microservices
How do you ship better (cloud) software
faster?
Microservices. (Multiple, asynchronous launches.)
Take the standard development process:
Code
(Dev)
Test
(QA)
Prod
(Ops)
Release
(Release)
Define
(Product)
1
0
… and make it distributed.
> No central release, test, dev cycle. Each person/team operates
an independent development process.
> Team needs to have the skills / knowledge to operate all
aspects of the development process.
Service A Service B Service C
1
1
Microservices is a distributed
development process for cloud-native
software.
> Not an architecture! Your architecture supports
the process, and not the other way around.
1
2
How do you adopt a distributed
development process?
Start by creating an independent process!
(with a from-scratch API service)
New serviceMonolith
independent
process!!
(think spinning off a
developer or dev team)
1
4
1. Self-sufficiency. Each team needs to be self-sufficient in all aspects
of the development cycle to avoid bottlenecks.
2. Safety. Since it’s hard to be an expert in every area of the
development, need to insure an oops isn’t catastrophic.
Give the developer / dev team the ability to
SUCCESSFULLY operate independently.
The definition of self-sufficient safety varies based on
the evolution of your microservice.
Stage 1:
Prototyping
Stage 2:
Production
Stage 3: Internal
service
consumption
Service doesn’t crash
Workflow for prod
deploys, monitoring,
& debugging
No cascade failures
Productive dev
environment
Transparently add
service resilience
No negative user
impact
Self
sufficiency
Safety
1
6
Together, Kubernetes, Docker, and Envoy give your developers the
basic infrastructure for self-sufficiency & safety.
17
1. Microservices is a distributed development workflow
that helps you go faster.
2. An efficient workflow for your team provides
self-sufficiency and safety.
3. The Kubernetes ecosystem, Docker, and Envoy provide
the foundational components you need to build that
workflow.
Docker, Kubernetes, and Envoy
Core Concept 1: Containers
datawire.io
What is a container?
● Lightweight Linux environment. It is a form of virtualization… but very different
from a full virtual machine.
● Immutable, deployable artifact.
● Runnable.
● Popularized by Docker but there are many runtime implementations (e.g. LXC,
Rkt).
20
datawire.io
What is Docker?
● A tool, ecosystem and platform for building, pushing and
running containers.
● The most popular container runtime currently.
● Default container runtime in Kubernetes.
21
datawire.io
Why Containers?
● Easy and fast to produce.
● Great way to isolate different components in a complex system.
● Ensures a reproducible runtime for your app along the dev -> build -> test -> prod
pipeline.
● Easy to share in a team or with external partners.
22
datawire.io
Your Development Environment
23
datawire.io
Let’s Get Started...
● We’ve built an Ubuntu container image for you
○ Includes all the client-side tools we’ll use for the training (e.g., kubectl)
● We’ll use Kubernaut for Kubernetes clusters
○ On-demand, ephemeral clusters (designed for CI … or training!)
● The container mounts a local directory into /workspace in
the image your files are synchronized with your laptop.
24
datawire.io
Let’s Get Started...
Run the below commands in your terminal if you haven’t
already:
$ git clone https://github.com/datawire/shopbox
$ cd shopbox
$ ./shopbox.sh
Pre-configured dev environment with kubectl (with tab completion),
kubernaut, and various utilities we will use today.
25
datawire.io
Back to containers ...
26
datawire.io
Let’s build a service as a container
A simple web application: Quote of The Moment (“QOTM”).
● Requires Python
● Uses Flask
GET STARTED
$ git clone https://github.com/datawire/qotm
$ cd qotm
27
datawire.io
The Dockerfile
FROM python:3-alpine
MAINTAINER Datawire <dev@datawire.io>
LABEL PROJECT_REPO_URL = "git@github.com:datawire/qotm.git" 
PROJECT_REPO_BROWSER_URL = "https://github.com/datawire/qotm" 
DESCRIPTION = "(Obscure) Quote of the Moment!" 
VENDOR = "Datawire, Inc." 
VENDOR_URL = "https://datawire.io/"
WORKDIR /service
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . ./
EXPOSE 5000
ENTRYPOINT ["python3", "qotm/qotm.py"]
28
datawire.io
Let’s build it!
Run the below command to build the image (the trailing period on the below
command is required!):
$ docker build -t <your-docker-user>/qotm:1 .
29
Each Docker image consists of layers. A layer is an ordered union of files
and directory changes to an image.
Because layers are cached, putting the parts of the Dockerfile least likely to
change first (e.g., the OS) can make a huge difference in build speed.
datawire.io
What Just Happened?
1. Docker executed the instructions in the Dockerfile. Each command created a new
layer.
2. Docker composes an image from all the layers.
3. The docker engine pointed a named reference
<your-docker-user>/qotm:1 at the final image.
30
datawire.io
Tagging is Important and Useful
● Tags allow you to easily reference and reuse an image.
● You can create multiple tags to point at the same image which can be useful in
sharing contexts.
● Tags can be pushed to a Docker registry so other people can reuse your image!
31
datawire.io
Run the image!
Images are an inert, immutable file. When you want to run an image, a container is
produced.
RUN THE IMAGE
$ docker run --rm -dit -p 5000:5000 <your-docker-user>/qotm:1
# open another shell (that is *not* running shopbox)
$ curl localhost:5000
32
datawire.io
Share the image
We’ve got an image running on your laptop, but you really want to share it -- with
Kubernetes, with your colleagues, with your family & friends ...
PUSH THE IMAGE
$ docker login
$ docker push <your-docker-user>/qotm:1
33
You can see the image on your public Docker Hub account at
https://hub.docker.com.
datawire.io
One last thing ...
Docker does a great job of running the container. Why can’t I just use Docker
everywhere?
WHAT HAPPENS IF WE CRASH?
$ curl localhost:5000/crash
$ curl localhost:5000
Uh oh … we need something that is a little bit smarter!
34
Core Concept 2: Kubernetes
datawire.io
What is Kubernetes?
● Runs massive numbers of containers based on
lessons learned by Google.
● Schedules and runs all kinds of containers
○ long-lived (e.g. services)
○ short-lived (e.g. pre-launch hooks, cronjobs etc)
● Kubernetes can be thought of as a Distributed OS or process manager
36
datawire.io
The Office Tower Analogy
Your product is the building
as a whole.
Your business logic is
the offices and workers
37
datawire.io
The Office Tower Analogy
Kubernetes provides the
infrastructure to build your
app around.
38
It is the foundational app
platform for your team to
build your businesses apps
around.
datawire.io
Kubernetes Architecture
Types of nodes: Masters and Workers
39
Docker Kubelet
Kubeproxy
Kubernetes Node
Docker Kubelet
Kubeproxy
Kubernetes Node
Docker Kubelet
Kubeproxy
Kubernetes Node
Etcd API Server
Controller Manager
Kubernetes Master
Scheduler
datawire.io
4 basic concepts
40
Container packages your code in
a portable way
Pod gives your code a temporary
home inside the cluster
Deployment keeps your code
running, even when it is updated
Service provides a stable address
that can reach many pods
datawire.io
Your Development Environment
41
datawire.io
Kubernaut
● You can get your own Kubernetes cluster easily with Google, Microsoft etc.
● Or you can install Kubernetes yourself in AWS
● To simplify things, we’re going to let you borrow some of our Kubernetes clusters
:)
● We’re going to use Kubernaut which provides on-demand K8S clusters for our
internal CI/CD systems.
42
datawire.io
Kubernaut
Visit https://kubernaut.io/token
$ kubernaut set-token <TOKEN>
$ kubernaut claim
$ export KUBECONFIG=${HOME}/.kube/kubernaut
43
datawire.io
Back to Kubernetes
44
datawire.io
Let’s see if there’s anything running!
$ kubectl get services
$ kubectl get pods
45
datawire.io
Let’s run our container
$ kubectl run qotm --image=<your-docker-user>/qotm:1
$ kubectl get pods
We see a pod! How do we talk to the pod?
46
Pod gives your code a temporary
home inside the cluster
datawire.io
We need to talk to the pod!
We can tell Kubernetes to forward requests from outside the cluster to the pod, and
vice versa.
$ kubectl port-forward <pod-name> 5000 &
$ curl localhost:5000
47
datawire.io
What happens when a pod crashes?
48
Let’s crash the pod again.
$ curl localhost:5000/crash
$ curl localhost:5000
Note: don’t run this loop too often. If you crash your server too frequently, Kubernetes
will assume it is having deeper problems, and will introduce a delay before attempting
to restart.
datawire.io
What just happened?
The Kubernetes pod automatically restarted the container!
● By default, Kubernetes will detect failures and auto-restart (with exponential
backoff, capped at 5 minutes)
● Kubernetes also lets you extend this with custom liveness and readiness probes
49
datawire.io
Managing pods
● What if we want to update the software on our pod?
● What if we want more than one pod running, for availability or scalability
reasons?
50
Deployment keeps your code
running, even when it is updated
datawire.io
Deployments
Kubernetes provides extensive control over how pods are run. These are specified by a deployment object.
51
datawire.io
Let’s try using a deployment
52
$ kubectl get pods
$ kubectl delete deployment qotm
$ kubectl apply -f kubernetes/qotm-deployment.yaml
$ kubectl get pods
We see we’re now running three pods!
To save bandwidth, this
deployment.yaml points to a
prebuilt QOTM image we’ve
already uploaded. Feel free to
edit it to point to your Docker
repo.
datawire.io
How do we talk to these pods?
It would be silly to set up port-forwards to each pod … and load balancing would be
nice.
53
Service provides a stable address
that can reach many pods
datawire.io
Service
Kubernetes provides extensive control over how pods are run. These are specified in a service file.
54
datawire.io
Services Illustrated
A Service becomes a DNS A record pointing the pod IP addresses
55
IP: 100.124.71.175
blog-0
kube-worker-0
IP: 100.124.71.176
blog-1
kube-worker-1
Kubernetes cluster
blog DNS (short) => blog
DNS (long) => blog.default.cluster.local
datawire.io
Service Flavors
● Many different flavors of “Service” in Kubernetes
○ ClusterIP
○ NodePort
○ LoadBalancer
○ ExternalName - often forgotten, but very useful!
56
datawire.io
Let’s try using a service
57
$ kubectl apply -f kubernetes/qotm-service.yaml
$ kubectl get services # get qotm port highlighted below
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.96.0.1 <none> 443/TCP 2d
qotm 10.107.109.252 <nodes> 80:<port>/TCP 6s
$ kubectl cluster-info # get cluster hostname
$ curl http://<cluster-hostname>:<port>
# or use this script for convenience:
$ curl $(url.sh qotm)
datawire.io
Recap: The source -> Kubernetes workflow
58
A
Build a container image that contains your code,
dependencies, and configuration, based on the Dockerfile.
B Tag the image.
C Push image to a container registry.
D Update Kubernetes manifest with tag.
E Apply Kubernetes manifest to cluster.
F Repeat for all dependencies.
datawire.io 59
Container packages your code in
a portable way
Pod gives your code a temporary
home inside the cluster
Deployment keeps your code
running, even when it is updated
Service provides a stable address
that can reach many pods
Let’s take a break!
(hopefully it’s around 3pm)
Core Concept 3: Envoy / L7
The definition of self-sufficient safety varies based on
the evolution of your microservice.
Stage 1:
Prototyping
Stage 2:
Production
Stage 3: Internal
service
consumption
Service doesn’t crash
Workflow for prod
deploys, monitoring,
& debugging
No cascade failures
Productive dev
environment
Transparently add
service resilience
No negative user
impact
datawire.io
Measuring user impact is a L7 problem!
● What is L7?
○ We really mean application-level protocols
○ HTTP, gRPC, Thrift, redis://, pgsql://, ...
● In a microservices architecture, your services are an L7 network
● For you to write a service that talks to your users and/or other services, you need
to understand & manage L7
63
datawire.io
L7 is now a development concern
● Everything has always been wired together with L7
● But in development, you could leave it (mostly) to operations
● Now, with microservices, L7 is a development concern as well:
○ More services
○ More remote dependencies
○ Greater release frequency
● So what does this mean for you?
64
datawire.io
You: stuck in the middle
● Users consume your service over L7
● You consume your dependencies over L7
● Literally everything in this picture is a source of failure
65
Layer 7
datawire.io
All your distributed systems problems are amplified
● Single points of failure
● Catastrophic failure modes
● Cascade failures
66
datawire.io
In plain terms
67
Layer 7
Users can
DDOS you
Your dependencies can
fail
Your hardware can failYour hardware can fail
You ship a buggy
update
datawire.io
In plain terms
68
Layer 7
Users can
DDOS you
Your dependencies can
fail
Your hardware can failYour hardware can fail
You ship a buggy
update
(rate limiting) (circuit breakers, timeouts, etc.)(software level redundancy)
datawire.io
How do we protect us from ourselves?
● If all our redundant hardware runs the same code, our own bugs quickly become
the biggest source of catastrophic failure
69
datawire.io
Create software level redundancy
● Redundant hardware protects us from mechanical failures
● We need redundant software implementations to protect us from our own bugs
● Canary testing is the most basic version of this
○ run multiple versions of your code to improve resiliency (like genetic diversity)
Envoy helps us do this as well, but we need to wire it into our developer workflow
● This is what we will focus on
70
datawire.io
Envoy
● Modern, L7 proxy, designed for distributed cloud architectures
○ L7 observability
○ Resilience
■ Global rate limiting
■ Advanced load balancing
■ Circuit breakers
○ HTTP/2 & gRPC support
○ APIs for managing fleets of Envoys
● Adopted by the CNCF (which also hosts Kubernetes, Prometheus, Docker, among
other projects)
● Originally written by the engineering team at Lyft, and now with committers from
Google, IBM, Datawire, and others
● Alternatives: NGINX Plus, HAProxy
71
datawire.io
First, some setup
● We’re going to deploy multiple times from source to prod
● This means
○ Your deployment file needs to be templated, so you can point to multiple different versions in
production
○ You don’t want to manually run the docker build, etc commands by hand
● So we’re going to use a simple open source tool, Forge, to automate this process
● We’ve already set up the QOTM service to support Forge, which means:
○ A service.yaml file that specifies the service name
○ A Jinja2-templated Kubernetes manifest
● So run forge setup from your workspace directory to configure Forge for your
environment
72
datawire.io
Now, we can automatically deploy
# let’s delete the original services
$ kubectl delete svc qotm
$ kubectl delete deploy qotm
# deploy from source to cluster, using templated k8s manifest
$ forge deploy
73
datawire.io
Canary testing
● Route X% of your traffic to new version
● Monitor your metrics to make sure no difference between old version and new
version
● Gradually ramp up traffic to new version
Benefits
● Immediate rollback to old version
● Minimize impact of any error
Costs
● Need extra capacity for canary testing
● Need a L7 router (you can only do coarse canaries with K8S)
74
datawire.io
Let’s deploy Envoy!
At the top-level workspace directory (adjacent to your existing QOTM service)
$ git clone https://github.com/datawire/envoy-canary.git
$ forge deploy
$ API=$(url.sh api)
$ curl $API/qotm/ # don’t forget trailing slash
75
datawire.io
What did we just do?
● We deployed:
○ Envoy, pre-configured to collect stats, and work with Kubernetes
○ A (stub) auth service, which Envoy calls on a per request basis
● We are now routing to your QOTM through Envoy
○ QOTM we made a ClusterIP service instead of a NodePort
● If we are having bandwidth problems, we can manually deploy the following
images:
○ datawire/auth-training:1
○ datawire/envoy-training:1
76
datawire.io
Let’s set up monitoring with Prometheus
$ git clone https://github.com/datawire/prometheus-canary
$ forge deploy
$ url.sh prometheus
In your browser, visit http://<prometheus-url>.
77
datawire.io
Now, let’s deploy a canary
In qotm/qotm.py, add a time.sleep(0.5) to the statement() function.
$ CANARY=true forge deploy
$ while true; do curl $API/qotm/; done
78
datawire.io
Monitor the canary
In Prometheus, execute this query:
{__name__=~"envoy_cluster_qotm_upstream_rq_time_timer|envoy_cluste
r_qotm_canary_upstream_rq_time_timer"}
Hit execute periodically to see changes (you might also want to reduce the granularity
of the time window to 5 minutes).
79
Recap
datawire.io
The story so far ...
1. Adopting a fast, distributed workflow is critical to accelerating productivity.
2. Start building your workflow by thinking about the single developer/team, for a
single service.
3. We showed how Kubernetes, Docker, Envoy, and monitoring (e.g., Prometheus)
can be used to build your workflow.
4. Your workflow depends on the stage of your service.
5. Managing L7 is really important, and gives you new, critical capabilities such as
canary testing and transparent monitoring.
81
5
Analyze metrics by collecting them from Envoy and
adding to Prometheus.
82
Stage 1
prototyping
workflow
Stage 2
production
workflow
Recapping the workflow
1 Bootstrap the service. Clone a GitHub repo.
2 Code.
3
Run your code (in a dev Kube cluster). Docker build,
Kubernetes manifest, etc.
4
Deploy to production Kubernetes cluster. Canary
routing via Envoy.
datawire.io
Some additional topics
● Service meshes
● Development environments
● Stateful services
● Organizational adoption
83
Service mesh
Stage 1:
Prototyping
Stage 2:
Production
Stage 3: Internal
service
consumption
Service doesn’t crash
Workflow for prod
deploys, monitoring,
& debugging
No cascade failures
Productive dev
environment
Transparently add
service resilience
No negative user
impact
datawire.io
Service meshes
● When you have stage 3 services, you want to think about a service mesh
○ But you should start with 1 service, so don’t worry about the service mesh right away!
● Provide two critical functions
○ Observability (e.g., tracing) across all of your services
○ Resilience across all of your services
● Function by deploying a sidecar proxy (e.g., Envoy) next to each of your services
● Use iptables or equivalent to insure all service egress traffic is routed through
sidecar
● Sidecar adds in trace IDs, circuit breaking, etc.
85
datawire.io 86
datawire.io
Stateful services
● Databases and such can be deployed with a Kubernetes manifest -- same
technique as Envoy or the existing services, but a different configuration
● Standard canary testing doesn’t work as well for stateful services
○ Envoy supports shadowing of requests
○ (We’re working on this so it’s more useable)
● If you have non-K8S resources (e.g., AWS RDS, etc.) consider adding the
Terraform/Ansible/etc. Scripts for creating these resources in another folder as
part of your standard service
87
datawire.io
Organizational adoption
● Build an API service, just like Stripe or Twilio
● Staff with a single, spinoff team
● Define the purpose of the service from the perspective of the user
● Don’t allow the service team to make any changes to the existing code base, or
vice versa
88
datawire.io
Thank you!
● (Anonymous) feedback survey -- would be VERY grateful if you could spend 5
minutes filling it out so we can get better
○ https://d6e.co/2yxVnmn
● Feel free to email us:
○ richard@datawire.io
○ rhs@datawire.io
○ plombardi@datawire.io
● If you’re interested in any of our open source tools, check them out:
○ https://forge.sh for deployment
○ https://www.telepresence.io for fast development cycles
○ https://www.getambassador.io easiest way to deploy/configure Envoy on Kubernetes
89
appendix
datawire.io
Testing microservices
● Traditional approach to testing a microservices architecture is with a staging
environment
○ First push services to staging
○ Then run integration tests
○ If tests pass, then push to production
● But this introduces a big tradeoff
○ In order to do a “true” integration testing, you need to synchronize your different service versions
in staging … and push those versions into production
○ But this introduces a bottleneck!
● So you want to think about more distributed strategies for integration testing
91
datawire.io 92

More Related Content

What's hot

Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationSuresh Balla
 
Docker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to DockerDocker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to DockerDocker, Inc.
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containersMauricio Garavaglia
 
Why Docker
Why DockerWhy Docker
Why DockerdotCloud
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersRyan Hodgin
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubdotCloud
 
Modernizing Java Apps with Docker
Modernizing Java Apps with DockerModernizing Java Apps with Docker
Modernizing Java Apps with DockerDocker, Inc.
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioJérôme Petazzoni
 
Continuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesLuke Marsden
 
Containers, OCI, CNCF, Magnum, Kuryr, and You!
Containers, OCI, CNCF, Magnum, Kuryr, and You!Containers, OCI, CNCF, Magnum, Kuryr, and You!
Containers, OCI, CNCF, Magnum, Kuryr, and You!Daniel Krook
 
Docker Roadshow 2016
Docker Roadshow 2016Docker Roadshow 2016
Docker Roadshow 2016Docker, Inc.
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifeidotCloud
 
Docker for any type of workload and any IT Infrastructure
Docker for any type of workload and any IT InfrastructureDocker for any type of workload and any IT Infrastructure
Docker for any type of workload and any IT InfrastructureDocker, Inc.
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2Docker, Inc.
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Open shift enterprise 3.1 paas on kubernetes
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetesSamuel Terburg
 
Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker
 

What's hot (20)

Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Docker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to DockerDocker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to Docker
 
Microservices using relocatable Docker containers
Microservices using relocatable Docker containersMicroservices using relocatable Docker containers
Microservices using relocatable Docker containers
 
Containers & Security
Containers & SecurityContainers & Security
Containers & Security
 
Why Docker
Why DockerWhy Docker
Why Docker
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the Containers
 
DockerCon Keynote Ben Golub
DockerCon Keynote Ben GolubDockerCon Keynote Ben Golub
DockerCon Keynote Ben Golub
 
Modernizing Java Apps with Docker
Modernizing Java Apps with DockerModernizing Java Apps with Docker
Modernizing Java Apps with Docker
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 
Abc of docker
Abc of dockerAbc of docker
Abc of docker
 
Continuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with Kubernetes
 
Containers, OCI, CNCF, Magnum, Kuryr, and You!
Containers, OCI, CNCF, Magnum, Kuryr, and You!Containers, OCI, CNCF, Magnum, Kuryr, and You!
Containers, OCI, CNCF, Magnum, Kuryr, and You!
 
Docker Roadshow 2016
Docker Roadshow 2016Docker Roadshow 2016
Docker Roadshow 2016
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifei
 
Docker for any type of workload and any IT Infrastructure
Docker for any type of workload and any IT InfrastructureDocker for any type of workload and any IT Infrastructure
Docker for any type of workload and any IT Infrastructure
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Open shift enterprise 3.1 paas on kubernetes
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetes
 
Docker Meetup 08 03-2016
Docker Meetup 08 03-2016Docker Meetup 08 03-2016
Docker Meetup 08 03-2016
 

Viewers also liked

Envoy Presentation Full Length Plus Retail Process
Envoy Presentation Full Length Plus Retail ProcessEnvoy Presentation Full Length Plus Retail Process
Envoy Presentation Full Length Plus Retail Processwijrwsr
 
Diversification of denim and its future in Bangladesh
Diversification of denim and its future in BangladeshDiversification of denim and its future in Bangladesh
Diversification of denim and its future in BangladeshMd. Mazadul Hasan Shishir
 
Industrial attachment of Olio apparels ltd (envoy group)
Industrial attachment of Olio apparels ltd (envoy group)Industrial attachment of Olio apparels ltd (envoy group)
Industrial attachment of Olio apparels ltd (envoy group)Md. Mazadul Hasan Shishir
 
Industrial attachment of fakir knitwears ltd
Industrial  attachment  of  fakir knitwears ltdIndustrial  attachment  of  fakir knitwears ltd
Industrial attachment of fakir knitwears ltdMd. Mazadul Hasan Shishir
 

Viewers also liked (9)

Envoy Presentation Full Length Plus Retail Process
Envoy Presentation Full Length Plus Retail ProcessEnvoy Presentation Full Length Plus Retail Process
Envoy Presentation Full Length Plus Retail Process
 
Soil release finish
Soil release finishSoil release finish
Soil release finish
 
Envoy group
Envoy groupEnvoy group
Envoy group
 
Diversification of denim and its future in Bangladesh
Diversification of denim and its future in BangladeshDiversification of denim and its future in Bangladesh
Diversification of denim and its future in Bangladesh
 
Industrial attachment of Olio apparels ltd (envoy group)
Industrial attachment of Olio apparels ltd (envoy group)Industrial attachment of Olio apparels ltd (envoy group)
Industrial attachment of Olio apparels ltd (envoy group)
 
Textile industry of bangladesh
Textile industry of bangladeshTextile industry of bangladesh
Textile industry of bangladesh
 
final
finalfinal
final
 
Industrial Attachment on Fakir Knitwear Limited
Industrial Attachment on Fakir Knitwear LimitedIndustrial Attachment on Fakir Knitwear Limited
Industrial Attachment on Fakir Knitwear Limited
 
Industrial attachment of fakir knitwears ltd
Industrial  attachment  of  fakir knitwears ltdIndustrial  attachment  of  fakir knitwears ltd
Industrial attachment of fakir knitwears ltd
 

Similar to Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, and Envoy

docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...Matteo Bisi
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...Andrea Fontana
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ....docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ...ICON UK EVENTS Limited
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...Puppet
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsAmbassador Labs
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainPuja Abbassi
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web DevelopersBADR
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web DevelopersAmr Fawzy
 
Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with dockerVishwas N
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsZohar Elkayam
 
Docker puebla bday #4 celebration
Docker puebla bday #4 celebrationDocker puebla bday #4 celebration
Docker puebla bday #4 celebrationRamon Morales
 
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...DynamicInfraDays
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Simon Storm
 

Similar to Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, and Envoy (20)

Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...
 
JOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in ProductionJOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in Production
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ....docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web Developers
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with docker
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOps
 
Docker puebla bday #4 celebration
Docker puebla bday #4 celebrationDocker puebla bday #4 celebration
Docker puebla bday #4 celebration
 
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
 
Container Days
Container DaysContainer Days
Container Days
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
 

More from Ambassador Labs

Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Ambassador Labs
 
Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...
Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...
Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...Ambassador Labs
 
Cloud native development without the toil
Cloud native development without the toilCloud native development without the toil
Cloud native development without the toilAmbassador Labs
 
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services Ambassador Labs
 
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...Ambassador Labs
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex GervaisAmbassador Labs
 
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard LiAmbassador Labs
 
What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0? What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0? Ambassador Labs
 
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes Ambassador Labs
 
Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador Labs
 
Telepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for KubernetesTelepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for KubernetesAmbassador Labs
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...Ambassador Labs
 
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...Ambassador Labs
 
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...Ambassador Labs
 
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCThe Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCAmbassador Labs
 
Ambassador Kubernetes-Native API Gateway
Ambassador Kubernetes-Native API GatewayAmbassador Kubernetes-Native API Gateway
Ambassador Kubernetes-Native API GatewayAmbassador Labs
 
Micro xchg 2018 - What is a Service Mesh?
Micro xchg 2018 - What is a Service Mesh? Micro xchg 2018 - What is a Service Mesh?
Micro xchg 2018 - What is a Service Mesh? Ambassador Labs
 
Webinar: Code Faster on Kubernetes
Webinar: Code Faster on KubernetesWebinar: Code Faster on Kubernetes
Webinar: Code Faster on KubernetesAmbassador Labs
 
QCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentAmbassador Labs
 
MA Microservices Meetup: Move fast and make things
MA Microservices Meetup: Move fast and make thingsMA Microservices Meetup: Move fast and make things
MA Microservices Meetup: Move fast and make thingsAmbassador Labs
 

More from Ambassador Labs (20)

Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
 
Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...
Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...
Ambassador Developer Office Hours: Summer of Kubernetes Ship Week 1: Intro to...
 
Cloud native development without the toil
Cloud native development without the toilCloud native development without the toil
Cloud native development without the toil
 
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
Webinar: Accelerate Your Inner Dev Loop for Kubernetes Services
 
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
[Confoo Montreal 2020] From Grief to Growth: The 7 Stages of Observability - ...
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
 
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
[QCon London 2020] The Future of Cloud Native API Gateways - Richard Li
 
What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0? What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0?
 
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
Webinar: Effective Management of APIs and the Edge when Adopting Kubernetes
 
Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy
 
Telepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for KubernetesTelepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for Kubernetes
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
 
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
 
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYCThe Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
The Simply Complex Task of Implementing Kubernetes Ingress - Velocity NYC
 
Ambassador Kubernetes-Native API Gateway
Ambassador Kubernetes-Native API GatewayAmbassador Kubernetes-Native API Gateway
Ambassador Kubernetes-Native API Gateway
 
Micro xchg 2018 - What is a Service Mesh?
Micro xchg 2018 - What is a Service Mesh? Micro xchg 2018 - What is a Service Mesh?
Micro xchg 2018 - What is a Service Mesh?
 
Webinar: Code Faster on Kubernetes
Webinar: Code Faster on KubernetesWebinar: Code Faster on Kubernetes
Webinar: Code Faster on Kubernetes
 
QCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented Development
 
MA Microservices Meetup: Move fast and make things
MA Microservices Meetup: Move fast and make thingsMA Microservices Meetup: Move fast and make things
MA Microservices Meetup: Move fast and make things
 

Recently uploaded

Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 

Recently uploaded (20)

Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 

Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, and Envoy

  • 1. Building resilient microservices with Kubernetes, Docker, and Envoy Phil Lombardi, Rafael Schloming, Richard Li, and Ed Rousseau
  • 2. datawire.io Before we begin ... ● You’re running latest version of Docker on your laptop ● You’ve created an account on hub.docker.com ● You’ve downloaded some key Docker images ○ docker pull datawire/ambassador-envoy ○ docker pull prom/prometheus ○ docker pull python:3-alpine ● You’ve set up a working environment (we’ve pre-installed everything for you) ○ Ubuntu Docker image ○ git clone https://github.com/datawire/shopbox ○ cd shopbox ○ ./shopbox.sh ● You have your favorite terminal & text editor ready to go! Go to the presentation here: https://d6e.co/2xQyXzN 2
  • 3. datawire.io About us ● Been working with microservices for past 2.5 years, both with our own cloud services and with consulting ● We build open source tools for developers building microservices, based on our own experiences ● Host microservices.com, which has talks from dozens of practitioners on microservices 3
  • 4. datawire.io Introduction: Microservices, Kubernetes, Docker, Envoy 20 minutes Presentation Core Concepts of Docker & Kubernetes 70 minutes Workshop Break around 3pm 30 minutes Building & deploying a microservice in production 60 minutes Workshop Wrap-up 20 minutes Presentation / Q&A Feedback 5 minutes Our schedule for today 4
  • 5. datawire.io Our focus today 1. Trying to communicate the key concepts 2. Minimize time spent on the mechanics, since they’re impossible to remember until you do them often enough 3. Try to give you a mental model to understand the different (overwhelming) choices in the Kubernetes ecosystem, and how to start. 4. If you don’t understand the purpose of a specific exercise, please ask! Also … Minikube is a popular choice for these trainings, since you can run things locally. But minikube is a big performance hog and isn’t quite as realistic with some of the things we’re doing, so we’re going to try to use the Internet. (We have done some work to minimize bandwidth consumption.) 5
  • 7. How do you ship better (cloud) software faster?
  • 9. Take the standard development process: Code (Dev) Test (QA) Prod (Ops) Release (Release) Define (Product)
  • 10. 1 0 … and make it distributed. > No central release, test, dev cycle. Each person/team operates an independent development process. > Team needs to have the skills / knowledge to operate all aspects of the development process. Service A Service B Service C
  • 11. 1 1 Microservices is a distributed development process for cloud-native software. > Not an architecture! Your architecture supports the process, and not the other way around.
  • 12. 1 2 How do you adopt a distributed development process?
  • 13. Start by creating an independent process! (with a from-scratch API service) New serviceMonolith independent process!! (think spinning off a developer or dev team)
  • 14. 1 4 1. Self-sufficiency. Each team needs to be self-sufficient in all aspects of the development cycle to avoid bottlenecks. 2. Safety. Since it’s hard to be an expert in every area of the development, need to insure an oops isn’t catastrophic. Give the developer / dev team the ability to SUCCESSFULLY operate independently.
  • 15. The definition of self-sufficient safety varies based on the evolution of your microservice. Stage 1: Prototyping Stage 2: Production Stage 3: Internal service consumption Service doesn’t crash Workflow for prod deploys, monitoring, & debugging No cascade failures Productive dev environment Transparently add service resilience No negative user impact Self sufficiency Safety
  • 16. 1 6 Together, Kubernetes, Docker, and Envoy give your developers the basic infrastructure for self-sufficiency & safety.
  • 17. 17 1. Microservices is a distributed development workflow that helps you go faster. 2. An efficient workflow for your team provides self-sufficiency and safety. 3. The Kubernetes ecosystem, Docker, and Envoy provide the foundational components you need to build that workflow.
  • 19. Core Concept 1: Containers
  • 20. datawire.io What is a container? ● Lightweight Linux environment. It is a form of virtualization… but very different from a full virtual machine. ● Immutable, deployable artifact. ● Runnable. ● Popularized by Docker but there are many runtime implementations (e.g. LXC, Rkt). 20
  • 21. datawire.io What is Docker? ● A tool, ecosystem and platform for building, pushing and running containers. ● The most popular container runtime currently. ● Default container runtime in Kubernetes. 21
  • 22. datawire.io Why Containers? ● Easy and fast to produce. ● Great way to isolate different components in a complex system. ● Ensures a reproducible runtime for your app along the dev -> build -> test -> prod pipeline. ● Easy to share in a team or with external partners. 22
  • 24. datawire.io Let’s Get Started... ● We’ve built an Ubuntu container image for you ○ Includes all the client-side tools we’ll use for the training (e.g., kubectl) ● We’ll use Kubernaut for Kubernetes clusters ○ On-demand, ephemeral clusters (designed for CI … or training!) ● The container mounts a local directory into /workspace in the image your files are synchronized with your laptop. 24
  • 25. datawire.io Let’s Get Started... Run the below commands in your terminal if you haven’t already: $ git clone https://github.com/datawire/shopbox $ cd shopbox $ ./shopbox.sh Pre-configured dev environment with kubectl (with tab completion), kubernaut, and various utilities we will use today. 25
  • 27. datawire.io Let’s build a service as a container A simple web application: Quote of The Moment (“QOTM”). ● Requires Python ● Uses Flask GET STARTED $ git clone https://github.com/datawire/qotm $ cd qotm 27
  • 28. datawire.io The Dockerfile FROM python:3-alpine MAINTAINER Datawire <dev@datawire.io> LABEL PROJECT_REPO_URL = "git@github.com:datawire/qotm.git" PROJECT_REPO_BROWSER_URL = "https://github.com/datawire/qotm" DESCRIPTION = "(Obscure) Quote of the Moment!" VENDOR = "Datawire, Inc." VENDOR_URL = "https://datawire.io/" WORKDIR /service COPY requirements.txt . RUN pip install -r requirements.txt COPY . ./ EXPOSE 5000 ENTRYPOINT ["python3", "qotm/qotm.py"] 28
  • 29. datawire.io Let’s build it! Run the below command to build the image (the trailing period on the below command is required!): $ docker build -t <your-docker-user>/qotm:1 . 29 Each Docker image consists of layers. A layer is an ordered union of files and directory changes to an image. Because layers are cached, putting the parts of the Dockerfile least likely to change first (e.g., the OS) can make a huge difference in build speed.
  • 30. datawire.io What Just Happened? 1. Docker executed the instructions in the Dockerfile. Each command created a new layer. 2. Docker composes an image from all the layers. 3. The docker engine pointed a named reference <your-docker-user>/qotm:1 at the final image. 30
  • 31. datawire.io Tagging is Important and Useful ● Tags allow you to easily reference and reuse an image. ● You can create multiple tags to point at the same image which can be useful in sharing contexts. ● Tags can be pushed to a Docker registry so other people can reuse your image! 31
  • 32. datawire.io Run the image! Images are an inert, immutable file. When you want to run an image, a container is produced. RUN THE IMAGE $ docker run --rm -dit -p 5000:5000 <your-docker-user>/qotm:1 # open another shell (that is *not* running shopbox) $ curl localhost:5000 32
  • 33. datawire.io Share the image We’ve got an image running on your laptop, but you really want to share it -- with Kubernetes, with your colleagues, with your family & friends ... PUSH THE IMAGE $ docker login $ docker push <your-docker-user>/qotm:1 33 You can see the image on your public Docker Hub account at https://hub.docker.com.
  • 34. datawire.io One last thing ... Docker does a great job of running the container. Why can’t I just use Docker everywhere? WHAT HAPPENS IF WE CRASH? $ curl localhost:5000/crash $ curl localhost:5000 Uh oh … we need something that is a little bit smarter! 34
  • 35. Core Concept 2: Kubernetes
  • 36. datawire.io What is Kubernetes? ● Runs massive numbers of containers based on lessons learned by Google. ● Schedules and runs all kinds of containers ○ long-lived (e.g. services) ○ short-lived (e.g. pre-launch hooks, cronjobs etc) ● Kubernetes can be thought of as a Distributed OS or process manager 36
  • 37. datawire.io The Office Tower Analogy Your product is the building as a whole. Your business logic is the offices and workers 37
  • 38. datawire.io The Office Tower Analogy Kubernetes provides the infrastructure to build your app around. 38 It is the foundational app platform for your team to build your businesses apps around.
  • 39. datawire.io Kubernetes Architecture Types of nodes: Masters and Workers 39 Docker Kubelet Kubeproxy Kubernetes Node Docker Kubelet Kubeproxy Kubernetes Node Docker Kubelet Kubeproxy Kubernetes Node Etcd API Server Controller Manager Kubernetes Master Scheduler
  • 40. datawire.io 4 basic concepts 40 Container packages your code in a portable way Pod gives your code a temporary home inside the cluster Deployment keeps your code running, even when it is updated Service provides a stable address that can reach many pods
  • 42. datawire.io Kubernaut ● You can get your own Kubernetes cluster easily with Google, Microsoft etc. ● Or you can install Kubernetes yourself in AWS ● To simplify things, we’re going to let you borrow some of our Kubernetes clusters :) ● We’re going to use Kubernaut which provides on-demand K8S clusters for our internal CI/CD systems. 42
  • 43. datawire.io Kubernaut Visit https://kubernaut.io/token $ kubernaut set-token <TOKEN> $ kubernaut claim $ export KUBECONFIG=${HOME}/.kube/kubernaut 43
  • 45. datawire.io Let’s see if there’s anything running! $ kubectl get services $ kubectl get pods 45
  • 46. datawire.io Let’s run our container $ kubectl run qotm --image=<your-docker-user>/qotm:1 $ kubectl get pods We see a pod! How do we talk to the pod? 46 Pod gives your code a temporary home inside the cluster
  • 47. datawire.io We need to talk to the pod! We can tell Kubernetes to forward requests from outside the cluster to the pod, and vice versa. $ kubectl port-forward <pod-name> 5000 & $ curl localhost:5000 47
  • 48. datawire.io What happens when a pod crashes? 48 Let’s crash the pod again. $ curl localhost:5000/crash $ curl localhost:5000 Note: don’t run this loop too often. If you crash your server too frequently, Kubernetes will assume it is having deeper problems, and will introduce a delay before attempting to restart.
  • 49. datawire.io What just happened? The Kubernetes pod automatically restarted the container! ● By default, Kubernetes will detect failures and auto-restart (with exponential backoff, capped at 5 minutes) ● Kubernetes also lets you extend this with custom liveness and readiness probes 49
  • 50. datawire.io Managing pods ● What if we want to update the software on our pod? ● What if we want more than one pod running, for availability or scalability reasons? 50 Deployment keeps your code running, even when it is updated
  • 51. datawire.io Deployments Kubernetes provides extensive control over how pods are run. These are specified by a deployment object. 51
  • 52. datawire.io Let’s try using a deployment 52 $ kubectl get pods $ kubectl delete deployment qotm $ kubectl apply -f kubernetes/qotm-deployment.yaml $ kubectl get pods We see we’re now running three pods! To save bandwidth, this deployment.yaml points to a prebuilt QOTM image we’ve already uploaded. Feel free to edit it to point to your Docker repo.
  • 53. datawire.io How do we talk to these pods? It would be silly to set up port-forwards to each pod … and load balancing would be nice. 53 Service provides a stable address that can reach many pods
  • 54. datawire.io Service Kubernetes provides extensive control over how pods are run. These are specified in a service file. 54
  • 55. datawire.io Services Illustrated A Service becomes a DNS A record pointing the pod IP addresses 55 IP: 100.124.71.175 blog-0 kube-worker-0 IP: 100.124.71.176 blog-1 kube-worker-1 Kubernetes cluster blog DNS (short) => blog DNS (long) => blog.default.cluster.local
  • 56. datawire.io Service Flavors ● Many different flavors of “Service” in Kubernetes ○ ClusterIP ○ NodePort ○ LoadBalancer ○ ExternalName - often forgotten, but very useful! 56
  • 57. datawire.io Let’s try using a service 57 $ kubectl apply -f kubernetes/qotm-service.yaml $ kubectl get services # get qotm port highlighted below NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes 10.96.0.1 <none> 443/TCP 2d qotm 10.107.109.252 <nodes> 80:<port>/TCP 6s $ kubectl cluster-info # get cluster hostname $ curl http://<cluster-hostname>:<port> # or use this script for convenience: $ curl $(url.sh qotm)
  • 58. datawire.io Recap: The source -> Kubernetes workflow 58 A Build a container image that contains your code, dependencies, and configuration, based on the Dockerfile. B Tag the image. C Push image to a container registry. D Update Kubernetes manifest with tag. E Apply Kubernetes manifest to cluster. F Repeat for all dependencies.
  • 59. datawire.io 59 Container packages your code in a portable way Pod gives your code a temporary home inside the cluster Deployment keeps your code running, even when it is updated Service provides a stable address that can reach many pods
  • 60. Let’s take a break! (hopefully it’s around 3pm)
  • 61. Core Concept 3: Envoy / L7
  • 62. The definition of self-sufficient safety varies based on the evolution of your microservice. Stage 1: Prototyping Stage 2: Production Stage 3: Internal service consumption Service doesn’t crash Workflow for prod deploys, monitoring, & debugging No cascade failures Productive dev environment Transparently add service resilience No negative user impact
  • 63. datawire.io Measuring user impact is a L7 problem! ● What is L7? ○ We really mean application-level protocols ○ HTTP, gRPC, Thrift, redis://, pgsql://, ... ● In a microservices architecture, your services are an L7 network ● For you to write a service that talks to your users and/or other services, you need to understand & manage L7 63
  • 64. datawire.io L7 is now a development concern ● Everything has always been wired together with L7 ● But in development, you could leave it (mostly) to operations ● Now, with microservices, L7 is a development concern as well: ○ More services ○ More remote dependencies ○ Greater release frequency ● So what does this mean for you? 64
  • 65. datawire.io You: stuck in the middle ● Users consume your service over L7 ● You consume your dependencies over L7 ● Literally everything in this picture is a source of failure 65 Layer 7
  • 66. datawire.io All your distributed systems problems are amplified ● Single points of failure ● Catastrophic failure modes ● Cascade failures 66
  • 67. datawire.io In plain terms 67 Layer 7 Users can DDOS you Your dependencies can fail Your hardware can failYour hardware can fail You ship a buggy update
  • 68. datawire.io In plain terms 68 Layer 7 Users can DDOS you Your dependencies can fail Your hardware can failYour hardware can fail You ship a buggy update (rate limiting) (circuit breakers, timeouts, etc.)(software level redundancy)
  • 69. datawire.io How do we protect us from ourselves? ● If all our redundant hardware runs the same code, our own bugs quickly become the biggest source of catastrophic failure 69
  • 70. datawire.io Create software level redundancy ● Redundant hardware protects us from mechanical failures ● We need redundant software implementations to protect us from our own bugs ● Canary testing is the most basic version of this ○ run multiple versions of your code to improve resiliency (like genetic diversity) Envoy helps us do this as well, but we need to wire it into our developer workflow ● This is what we will focus on 70
  • 71. datawire.io Envoy ● Modern, L7 proxy, designed for distributed cloud architectures ○ L7 observability ○ Resilience ■ Global rate limiting ■ Advanced load balancing ■ Circuit breakers ○ HTTP/2 & gRPC support ○ APIs for managing fleets of Envoys ● Adopted by the CNCF (which also hosts Kubernetes, Prometheus, Docker, among other projects) ● Originally written by the engineering team at Lyft, and now with committers from Google, IBM, Datawire, and others ● Alternatives: NGINX Plus, HAProxy 71
  • 72. datawire.io First, some setup ● We’re going to deploy multiple times from source to prod ● This means ○ Your deployment file needs to be templated, so you can point to multiple different versions in production ○ You don’t want to manually run the docker build, etc commands by hand ● So we’re going to use a simple open source tool, Forge, to automate this process ● We’ve already set up the QOTM service to support Forge, which means: ○ A service.yaml file that specifies the service name ○ A Jinja2-templated Kubernetes manifest ● So run forge setup from your workspace directory to configure Forge for your environment 72
  • 73. datawire.io Now, we can automatically deploy # let’s delete the original services $ kubectl delete svc qotm $ kubectl delete deploy qotm # deploy from source to cluster, using templated k8s manifest $ forge deploy 73
  • 74. datawire.io Canary testing ● Route X% of your traffic to new version ● Monitor your metrics to make sure no difference between old version and new version ● Gradually ramp up traffic to new version Benefits ● Immediate rollback to old version ● Minimize impact of any error Costs ● Need extra capacity for canary testing ● Need a L7 router (you can only do coarse canaries with K8S) 74
  • 75. datawire.io Let’s deploy Envoy! At the top-level workspace directory (adjacent to your existing QOTM service) $ git clone https://github.com/datawire/envoy-canary.git $ forge deploy $ API=$(url.sh api) $ curl $API/qotm/ # don’t forget trailing slash 75
  • 76. datawire.io What did we just do? ● We deployed: ○ Envoy, pre-configured to collect stats, and work with Kubernetes ○ A (stub) auth service, which Envoy calls on a per request basis ● We are now routing to your QOTM through Envoy ○ QOTM we made a ClusterIP service instead of a NodePort ● If we are having bandwidth problems, we can manually deploy the following images: ○ datawire/auth-training:1 ○ datawire/envoy-training:1 76
  • 77. datawire.io Let’s set up monitoring with Prometheus $ git clone https://github.com/datawire/prometheus-canary $ forge deploy $ url.sh prometheus In your browser, visit http://<prometheus-url>. 77
  • 78. datawire.io Now, let’s deploy a canary In qotm/qotm.py, add a time.sleep(0.5) to the statement() function. $ CANARY=true forge deploy $ while true; do curl $API/qotm/; done 78
  • 79. datawire.io Monitor the canary In Prometheus, execute this query: {__name__=~"envoy_cluster_qotm_upstream_rq_time_timer|envoy_cluste r_qotm_canary_upstream_rq_time_timer"} Hit execute periodically to see changes (you might also want to reduce the granularity of the time window to 5 minutes). 79
  • 80. Recap
  • 81. datawire.io The story so far ... 1. Adopting a fast, distributed workflow is critical to accelerating productivity. 2. Start building your workflow by thinking about the single developer/team, for a single service. 3. We showed how Kubernetes, Docker, Envoy, and monitoring (e.g., Prometheus) can be used to build your workflow. 4. Your workflow depends on the stage of your service. 5. Managing L7 is really important, and gives you new, critical capabilities such as canary testing and transparent monitoring. 81
  • 82. 5 Analyze metrics by collecting them from Envoy and adding to Prometheus. 82 Stage 1 prototyping workflow Stage 2 production workflow Recapping the workflow 1 Bootstrap the service. Clone a GitHub repo. 2 Code. 3 Run your code (in a dev Kube cluster). Docker build, Kubernetes manifest, etc. 4 Deploy to production Kubernetes cluster. Canary routing via Envoy.
  • 83. datawire.io Some additional topics ● Service meshes ● Development environments ● Stateful services ● Organizational adoption 83
  • 84. Service mesh Stage 1: Prototyping Stage 2: Production Stage 3: Internal service consumption Service doesn’t crash Workflow for prod deploys, monitoring, & debugging No cascade failures Productive dev environment Transparently add service resilience No negative user impact
  • 85. datawire.io Service meshes ● When you have stage 3 services, you want to think about a service mesh ○ But you should start with 1 service, so don’t worry about the service mesh right away! ● Provide two critical functions ○ Observability (e.g., tracing) across all of your services ○ Resilience across all of your services ● Function by deploying a sidecar proxy (e.g., Envoy) next to each of your services ● Use iptables or equivalent to insure all service egress traffic is routed through sidecar ● Sidecar adds in trace IDs, circuit breaking, etc. 85
  • 87. datawire.io Stateful services ● Databases and such can be deployed with a Kubernetes manifest -- same technique as Envoy or the existing services, but a different configuration ● Standard canary testing doesn’t work as well for stateful services ○ Envoy supports shadowing of requests ○ (We’re working on this so it’s more useable) ● If you have non-K8S resources (e.g., AWS RDS, etc.) consider adding the Terraform/Ansible/etc. Scripts for creating these resources in another folder as part of your standard service 87
  • 88. datawire.io Organizational adoption ● Build an API service, just like Stripe or Twilio ● Staff with a single, spinoff team ● Define the purpose of the service from the perspective of the user ● Don’t allow the service team to make any changes to the existing code base, or vice versa 88
  • 89. datawire.io Thank you! ● (Anonymous) feedback survey -- would be VERY grateful if you could spend 5 minutes filling it out so we can get better ○ https://d6e.co/2yxVnmn ● Feel free to email us: ○ richard@datawire.io ○ rhs@datawire.io ○ plombardi@datawire.io ● If you’re interested in any of our open source tools, check them out: ○ https://forge.sh for deployment ○ https://www.telepresence.io for fast development cycles ○ https://www.getambassador.io easiest way to deploy/configure Envoy on Kubernetes 89
  • 91. datawire.io Testing microservices ● Traditional approach to testing a microservices architecture is with a staging environment ○ First push services to staging ○ Then run integration tests ○ If tests pass, then push to production ● But this introduces a big tradeoff ○ In order to do a “true” integration testing, you need to synchronize your different service versions in staging … and push those versions into production ○ But this introduces a bottleneck! ● So you want to think about more distributed strategies for integration testing 91