SlideShare a Scribd company logo
Evolution of a Microservice Infrastructure
Jan Martens
OSDC 2019, Berlin
2
Details REWE Group
Turnover
>57 bn
History
>90 years
Employees
>345.000
Industries
Food Retail,
Tourism,
DIY
Shops
>15.000
3
What do we actually run?
Our history
Our history at REWE Digital
Service/team growth
2014
40 15
100
28
200
46
2015 2016 2017
# Services
# Dev Teams
1 2
2018
270
48
Recap
We’re operating a custom Docker-Environment consisting of:
Everything was cool. Developers could bring Code live. All was well.
Recap
The current state of 2018, achievements so far
… and looks like
Ingress-Nodes
Consul-Server
a.k.a
Master-Nodes
Docker-Hosts
a.k.a.
Worker-Nodes
Other “aaS”
* nS1 S1
S2 S2 S1
S1S1
S2
… and looks like
Ingress-Nodes
● Nginx-config written by
consul-template on
change of
Consul-information
● Routes external
Hostnames
Ingress-Nodes
Consul-Server
a.k.a
Master-Nodes
Docker-Hosts
a.k.a.
Worker-Nodes
Other “aaS”
* nS1 S1
S2 S2 S1
S1S1
S2
… and looks like
Ingress-Nodes
Consul-Server
a.k.a
Master-Nodes
Docker-Hosts
a.k.a.
Worker-Nodes
Other “aaS”
* nS1 S1
S2 S2 S1
S1S1
S2
Docker-Host
● Nginx-config written by
consul-template on
change of
Consul-information
● Routes internal
Hostnames to containers
● Runs containers
… and looks like
Ingress-Nodes
Consul-Server
a.k.a
Master-Nodes
Docker-Hosts
a.k.a.
Worker-Nodes
Other “aaS”
* nS1 S1
S2 S2 S1
S1S1
S2
Consul-Server & Swarm-Master
● Contain knowledge of all
services
● Deployments are started
from here
● Act as DNS-Servers for
service-discovery
… and looks like
Ingress-Nodes
Consul-Server
a.k.a
Master-Nodes
Docker-Hosts
a.k.a.
Worker-Nodes
Other “aaS”
* n
Other centrally managed
“platform-services”
● Kafka
● Databases
● ELK-Stack
● Prometheus & Grafana
● ...
S1 S1
S2 S2 S1
S1S1
S2
Deployments
● Blue-Green
○ only one color can be active
● Independent set of containers per color
○ started via docker-compose
Deployments
how we do them
● Teams can deploy themselves
● Color Switch per Service
● Both colors addressed via the same DNS record
Deployments
how we do them
Deployments
docker-2docker-1 docker-3
Consul Key/Value
S1
S2
S2
S1
Deployments
docker-2docker-1 docker-3
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
Deployments
docker-2docker-1 docker-3
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
basket
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
basket
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
S1
S2
S2
S1
basket
reload Nginx
Deployments
docker-2docker-1 docker-3
basket:
- active: blue
Consul Key/Value
S1
S2
S2
S1
basket
active: blue
Deployments
docker-2docker-1 docker-3
basket:
- active: blue
Consul Key/Value
S1
S2
S2
S1
basket
reload Nginx
active: blue
Deployments
docker-2docker-1 docker-3
basket:
- active: blue
Consul Key/Value
S1
S2
S2
S1
basket
reload Nginx
active: blue
deploy basket blue
● Both colors have the same DNS record
○ Consul will return IPs for all hosts
where the Service is running
● Nginx running on each Worker Node
○ routes to color depending on used Port
Request routing
how can services be addressed
Request Routing
docker-2docker-1 docker-3
S2
S2
S1
basket basket
Request Routing
docker-2 docker-3
S2
S1
basket
basket-service.rewe
docker-1
S2
basket
Request Routing
docker-2 docker-3
S2
S1
basket
basket-service.rewe
docker-1.rewe
docker-2.rewe
docker-1
S2
basket
Request Routing
docker-2 docker-3
S2
S1
basket
:80
docker-1
S2
basket
Request Routing
docker-2 docker-3
S2
S1
basket
:80
docker-1
S2
basket
Request Routing
docker-2 docker-3
S2
S1
basket
:90
docker-1
S2
basket
Request Routing
docker-2 docker-3
S2
S1
basket
:80
docker-1
S2
basket
Request Routing
docker-2 docker-3
S2
S1
basket
:80
docker-1
S2
basket
basket-service.rewe
docker-1.rewe
docker-2.rewe
ProblemsNginx
● Requests which never reached their destination
● Keepalive connections dropped after short time
Always happened at the time of deployments
Problems with Nginx
increased with the size of the environment
● Requests which never reached their destination
● Keepalive connections dropped after short time
Always happened at the time of deployments
● Consul-template would reload all Nginx instances
at the same time
Problems with Nginx
increased with the size of the environment
● Look for different reverse proxy
○ no reload on config change
○ dynamic configuration
Problems with Nginx
looking for solutions
Problems with Nginx
possible replacements
● Dynamically configurable
● Live reloading of configuration
● Lots of metrics
● Nice web ui
● Single Go binary
Traefik
1. Install alongside Nginx on Worker and Ingress Nodes
○ listen on different ports
2. Check that configured routes are correct and work
3. Change port mapping host by host
4. Remove Nginx
Traefik
how to migrate
Traefik
how to migrate
:80
docker-1
basket
basket-service.rewe
docker-1.rewe
docker-2.rewe
Traefik
how to migrate
:80
docker-1
basket
basket-service.rewe
docker-1.rewe
docker-2.rewe
:10080
Traefik
how to migrate
:80
docker-1
basket
basket-service.rewe
docker-1.rewe
docker-2.rewe
:10080
Traefik
how to migrate
:80
docker-1
basket
basket-service.rewe
docker-1.rewe
docker-2.rewe
● Keepalive and connection problems immediately went away
● Almost real time data about service response time
● Web UI to check routes
● Rich access logs
Traefik
Benefits
Traefik
Benefits
Traefik
Benefits
ProblemsSwarm
● Poor container spread
○ all service instances running on one host
● No self healing
● Manual node draining
○ dependent on docker-compose files
Problems with standalone Swarm
also increased
● Look for different container Orchestrator
○ self healing
○ proper container spread
Problems with standalone Swarm
looking for solutions
Problems with standalone Swarm
possible replacements
● Seamless Consul integration
○ almost no setup needed
● Self healing
● Bin packing
● Single Go binary
● Nice Web UI
Nomad
1. Install alongside Swarm on Worker and Master Nodes
○ agnostic of other Docker Containers
2. Modify deployment Jobs
○ Start new deployments via Nomad
3. Remove Swarm
Nomad
how to migrate
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
basket
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
basket
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
S1
S2
S2
S1
deploy basket blue
basket
Deployments
docker-2docker-1 docker-3
basket:
- active: green
Consul Key/Value
deploy basket blue
basket
S1
S2 S2
S1
● Ensures proper container spread
● Self healing on Node outage
● ACLs
● Job history
Nomad
Benefits
● Not limited to Docker
○ Rkt and LXC
● Not limited to Containers
○ Jar files
○ Binaries
○ VMs
Nomad
Benefits
Nomad
Benefits
Nomad
Benefits
Nomad
Benefits
What we Learned
● Having a centralised deployment-toolset
○ perform all changes for all teams / developers at the same time
● Do Canary-like changes on our infrastructure
○ fully interoperable changes
○ nginx <-> Traefik
What helped us most?
● You might not need Kubernetes
What did we learn?
● You might not need Kubernetes
● Keeping your architecture pluggable helps
What did we learn?
● You might not need Kubernetes
● Keeping your architecture pluggable helps
● Computing resources are finite
○ Setting resource limits can be difficult
What did we learn?
● You might not need Kubernetes
● Keeping your architecture pluggable helps
● Computing resources are finite
○ Setting resource limits can be difficult
● Distributed systems can be hard
What did we learn?
Thanks go to:
Thank You!
Jan Martens | github.com/jan-martens
www.rewe-digital.com | @rewedigitaltech
All background pictures are licensed under CC0. Source: pexels.com
Evolution of a Microservice Infrastructure
OSDC 2019, Berlin

More Related Content

PDF
Docker 1.12 and swarm mode
PPTX
Load Balancing Apps in Docker Swarm with NGINX
PDF
ContainerDayVietnam2016: Lesson Leanred on Docker 1.12 and Swarm Mode
PPTX
Docker Networking & Swarm Mode Introduction
PPTX
Docker swarm workshop
PDF
swarmmode-dojo
PDF
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
PPTX
Introction to docker swarm
Docker 1.12 and swarm mode
Load Balancing Apps in Docker Swarm with NGINX
ContainerDayVietnam2016: Lesson Leanred on Docker 1.12 and Swarm Mode
Docker Networking & Swarm Mode Introduction
Docker swarm workshop
swarmmode-dojo
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Introction to docker swarm

What's hot (20)

PDF
Docker swarm introduction
PDF
Docker Swarm Meetup (15min lightning)
PDF
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
PDF
Deeper Dive in Docker Overlay Networks
PDF
Open stack networking vlan, gre
PPTX
Introduction to docker swarm
PDF
Going Production with Docker and Swarm
PDF
Swarm mode
PDF
DevOpsDays Taipei 2017 從打鐵到雲端
PPTX
Docker Machine & Docker Swarm
PPTX
Docker Swarm for Beginner
PDF
LinuxKit Deep Dive
PDF
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
PDF
The age of orchestration: from Docker basics to cluster management
PDF
Docker Swarm & Machine
PDF
Transformative Git Practices
PDF
Deep Dive into Docker Swarm Mode
PDF
PDF
Paris container day june17
PPTX
Orchestrating Least Privilege by Diogo Monica
Docker swarm introduction
Docker Swarm Meetup (15min lightning)
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Deeper Dive in Docker Overlay Networks
Open stack networking vlan, gre
Introduction to docker swarm
Going Production with Docker and Swarm
Swarm mode
DevOpsDays Taipei 2017 從打鐵到雲端
Docker Machine & Docker Swarm
Docker Swarm for Beginner
LinuxKit Deep Dive
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
The age of orchestration: from Docker basics to cluster management
Docker Swarm & Machine
Transformative Git Practices
Deep Dive into Docker Swarm Mode
Paris container day june17
Orchestrating Least Privilege by Diogo Monica
Ad

Similar to OSDC 2019 | Evolution of a Microservice-Infrastructure by Jan Martens (20)

PDF
Complete-NGINX-Cookbook-2019.pdf
PDF
You got a couple Microservices, now what? - Adding SRE to DevOps
PDF
Butter bei die Fische - Ein Jahr Entwicklung und Produktion mit Docker
PDF
Docker-v3.pdf
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
PPTX
An Introduction to Kubernetes and Continuous Delivery Fundamentals
PPTX
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
PDF
Sheep it
PDF
Containers, Docker, and Microservices: the Terrific Trio
PDF
Building Bizweb Microservices with Docker
PDF
Rami Sayar - Node microservices with Docker
PDF
Docker in Production: How RightScale Delivers Cloud Applications
PPTX
The challenge of application distribution - Introduction to Docker (2014 dec ...
ODP
Ruby and Docker on Rails
PDF
OpenNebulaConf 2014 - Cloud Automation for OpenNebula - Kishorekumar Neelamegam
PDF
OpenNebula Conf 2014 | Cloud Automation for OpenNebula by Kishorekumar Neelam...
PPTX
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
PDF
Using Docker Developing and Deploying Software with Containers 1st Edition Ad...
PDF
Forced Evolution: Shopify's Journey to Kubernetes
PPTX
NGINX Lunch and Learn Event: Kubernetes and the NGINX Plus Ingress controller
Complete-NGINX-Cookbook-2019.pdf
You got a couple Microservices, now what? - Adding SRE to DevOps
Butter bei die Fische - Ein Jahr Entwicklung und Produktion mit Docker
Docker-v3.pdf
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
An Introduction to Kubernetes and Continuous Delivery Fundamentals
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
Sheep it
Containers, Docker, and Microservices: the Terrific Trio
Building Bizweb Microservices with Docker
Rami Sayar - Node microservices with Docker
Docker in Production: How RightScale Delivers Cloud Applications
The challenge of application distribution - Introduction to Docker (2014 dec ...
Ruby and Docker on Rails
OpenNebulaConf 2014 - Cloud Automation for OpenNebula - Kishorekumar Neelamegam
OpenNebula Conf 2014 | Cloud Automation for OpenNebula by Kishorekumar Neelam...
Docker Orchestration: Welcome to the Jungle! Devoxx & Docker Meetup Tour Nov ...
Using Docker Developing and Deploying Software with Containers 1st Edition Ad...
Forced Evolution: Shopify's Journey to Kubernetes
NGINX Lunch and Learn Event: Kubernetes and the NGINX Plus Ingress controller
Ad

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
medical staffing services at VALiNTRY
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PPT
Introduction Database Management System for Course Database
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Design an Analysis of Algorithms I-SECS-1021-03
Operating system designcfffgfgggggggvggggggggg
medical staffing services at VALiNTRY
How Creative Agencies Leverage Project Management Software.pdf
Nekopoi APK 2025 free lastest update
Upgrade and Innovation Strategies for SAP ERP Customers
Wondershare Filmora 15 Crack With Activation Key [2025
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
Introduction Database Management System for Course Database
How to Choose the Right IT Partner for Your Business in Malaysia
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
ManageIQ - Sprint 268 Review - Slide Deck
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Design an Analysis of Algorithms II-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Softaken Excel to vCard Converter Software.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

OSDC 2019 | Evolution of a Microservice-Infrastructure by Jan Martens