running microservice environments is no free lunch
TRANSCRIPT
![Page 1: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/1.jpg)
Running micro service environments is no free lunch
Dynatrace – Alois MayrB2W digital – Alexander Ramos
![Page 2: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/2.jpg)
@alexander__ @mayralois
![Page 3: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/3.jpg)
@alexander__ @mayralois
Enterprises often still run traditional monolithic applications
![Page 4: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/4.jpg)
@alexander__ @mayralois
Deliver value at the speed of business
700 deployments / YEAR
10 + deployments / DAY
50 – 60 deployments / DAY
Every 11.6 SECONDS
![Page 5: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/5.jpg)
@alexander__ @mayralois
-1000ms +2%
Response Time Conversions
-1000ms +10%
+100ms -1%
Not only fast delivered but also delivering fast
![Page 6: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/6.jpg)
@alexander__ @mayralois
Not only technical metrics count…
![Page 7: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/7.jpg)
@alexander__ @mayralois
…but also business metrics
![Page 8: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/8.jpg)
@alexander__ @mayralois
![Page 9: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/9.jpg)
@alexander__ @mayralois
![Page 10: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/10.jpg)
@alexander__ @mayralois
Biggest LatAm e-commerce company
R$ 10+ billion revenue(~ U$ 3 billion)
Americanas, SubmarinoShoptime, Soubarato
Rio de Janeiro and São Paulo, Brazil
![Page 11: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/11.jpg)
@alexander__ @mayralois
Why are we doing micro services?
![Page 12: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/12.jpg)
@alexander__ @mayralois
July 2014The Night of Darkness
![Page 13: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/13.jpg)
@alexander__ @mayralois
What exactly was broken?
![Page 14: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/14.jpg)
@alexander__ @mayralois
We didn’t know fast enough
Something in the monolith!
![Page 15: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/15.jpg)
@alexander__ @mayralois
Who’s involved in fixing it?
Devs write bugfixesOps had to act like heroesduring incidents
![Page 16: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/16.jpg)
@alexander__ @mayralois
What we have changed!
![Page 17: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/17.jpg)
@alexander__ @mayralois
![Page 18: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/18.jpg)
@alexander__ @mayralois
Change responsibilities! Code business rules into micro services
Each dev team owns its micro services
You developed it, you operate it in production
Dev teams have on call rotation too
Ops keep the platform, the databases, and facilities (logging, authorization, etc)
![Page 19: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/19.jpg)
@alexander__ @mayralois
Change communication!
Unified chat room and alerting system
Transparency is key
More and Faster deployments(~50/day)
![Page 20: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/20.jpg)
@alexander__ @mayralois
How we did it?
![Page 21: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/21.jpg)
@alexander__ @mayralois
Empower your developers! Devs need to be responsible for running services in production
Devs know the business domain
Devs know who should fix each service
![Page 22: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/22.jpg)
@alexander__ @mayralois
From monolith to micro services
Monolith
cart freight
skuinventory
Micro services
cart freight
sku inventory
![Page 23: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/23.jpg)
@alexander__ @mayralois
Dynatrace Ruxit service flow makes micro services visible
![Page 24: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/24.jpg)
@alexander__ @mayralois
Dynatrace Ruxit service flow makes micro services visible
![Page 25: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/25.jpg)
@alexander__ @mayralois
The Platform
![Page 26: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/26.jpg)
@alexander__ @mayralois
server server server server server server server server server server server server
Apache Mesos
Marathon Framework
Run micro servicesAuto-healing
Service discovery
Chronos Framework
Run batch jobsRetry
Orchestration API
CI / CD
One PaaS to run all micro services
![Page 27: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/27.jpg)
@alexander__ @mayralois
Which technology a micro service is built?
We don’t care!
![Page 28: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/28.jpg)
@alexander__ @mayralois
![Page 29: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/29.jpg)
@alexander__ @mayralois
What have we learned?
![Page 30: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/30.jpg)
@alexander__ @mayralois
#1 – From monolith to bad app First services didn’t scale well
It’s all about resource sharing- File descriptors- Connection pools- Docker image sizes
If it needs local state, it is a bug
![Page 31: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/31.jpg)
@alexander__ @mayralois
#2 – Legacy systems Most of your bad apps are legacy systems We keep legacy systems aside from Mesos Do Ops teams own legacy systems?
- 99.99% of the time the answer is yes- So, don’t mess with them- Write as many monitors as possible- Ops team should invest some time in auto remediation
Don’t treat legacy systems like micro services
![Page 32: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/32.jpg)
@alexander__ @mayralois
Datacenter BDatacenter A
#3 – Multi datacenter PaaS
server server server server server server server server server server
Apache Mesos
Marathon Framework
Chronos Framework
Orchestration API
CI / CD
Marathon Framework
Chronos Framework
(failover)
Apache MesosDon’t put all your eggs in one basket
![Page 33: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/33.jpg)
@alexander__ @mayralois
Filters wrongHTTP Methods (415)
HTTP Cachingpolicy (304)
Throttling (503)
Request/responsetransforming
#4 – Seriously, you need an API Gateway
Edge balancer
Api gateway
Api gateway
Api gateway
Edg
e tra
ffic
Cart
Freight
Sku
Inventory
Build micro service architecture with API Gateway
![Page 34: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/34.jpg)
@alexander__ @mayralois
#5 – Databases Flexibility is overrated when talking about databases Databases need state and overcommit Keep your database clusters isolated per application Right tool for the right problem (don’t throw everything on relational DB or on MongoDB) Run databases out of Mesos cluster. It is not that hard
Manage state isolated on the PaaS
![Page 35: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/35.jpg)
@alexander__ @mayralois
#6 – DevOps? Dev and Ops need to work closely together Ops own the platform but not the services running on it As long as Ops simplify Devs workflows, the job is good enough If Devs don’t like what Ops are doing, Ops are doing it wrong The platform’s sole purpose is to turn Devs life easier
Devs should think like Ops and Ops should think like Devs
Devs are the stars of the show
![Page 36: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/36.jpg)
@alexander__ @mayralois
Black Friday?
![Page 37: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/37.jpg)
@alexander__ @mayralois
We survived Black Friday
![Page 38: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/38.jpg)
@alexander__ @mayralois
![Page 39: Running microservice environments is no free lunch](https://reader035.vdocuments.net/reader035/viewer/2022062503/58ae27451a28ab7e4a8b66d7/html5/thumbnails/39.jpg)
Thanks!Questions?