SlideShare a Scribd company logo
scalingmicroserviceswith
messagequeues,springbootand
kubernetes
@danielepolencic
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
scalabilityandrobustness
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
10:00 pm08:00 pm06:00 pm05:00 pm03:00 pm01:00 pm
10k req/s
7k req/s
3k req/s
howdoyoudealwith
somuchtraffic?
!"
backend+frontend
BACKEND REST API
BACKEND REST API
BACKEND REST API
BACKEND REST API
BACKEND REST API
BACKEND REST API
BACKEND REST API
planningforlaunch!
User
User
BACKEND
API
User
BACKEND BACKEND BACKEND BACKEND
API
LOAD BALANCER
User
BACKEND BACKEND BACKEND BACKEND
API
LOAD BALANCER
LOAD BALANCER
User
BACKEND BACKEND BACKEND BACKEND
performancetests
BACKEND
BACKEND
• Stateless
• Limit: 1000 rq/s
BACKEND
• Stateless
• Limit: 1000 rq/s
• Stateless
• Limit: 250 rq/s
BACKEND
RATIO
1:4
ready…
10:00 pm08:00 pm06:00 pm05:00 pm03:00 pm01:00 pm
10k req/s
7k req/s
3k req/s
NOW
LOAD BALANCER
LOAD BALANCER
User
BACKEND BACKEND BACKEND BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND BACKEND BACKEND BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND BACKEND BACKEND BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND BACKEND BACKEND BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
toolittle,toolate
10:00 pm08:00 pm06:00 pm05:00 pm03:00 pm01:00 pm
10k req/s
7k req/s
3k req/s
NOW
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
User User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
gameover!
nicestory,butweknowhowtodo
scaling.
— Smart guy
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
theretailerreportedlydidn'thave
enoughserverstohandlethe
trafficsurgefortheday
— fortune.com
amazonhadtomanuallyadd
serverstoaddresstheissue(and
failedtoaddthemfastenough)
— fortune.com
whatcouldyouimprove?
1.automaticscaling?
2.decouplingscaling?
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND BACKEND
BACKENDBACKEND
BACKEND BACKEND
BACKEND
RATIO
1:4
LOAD BALANCER
LOAD BALANCER
BACKEND
BACKEND BACKEND
BACKENDBACKEND
BACKEND BACKEND
BACKEND
User
RATIO
1:4
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND BACKEND
BACKEND BACKEND
BACKEND BACKEND
BACKENDBACKEND
BACKEND BACKEND
BACKEND
RATIO
1:4
LOAD BALANCER
LOAD BALANCER
User
RATIO
1:2
BACKEND
BACKEND BACKEND
BACKEND BACKEND
BACKEND BACKEND
BACKENDBACKEND
BACKEND BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
RATIO
1:2
BACKEND
BACKEND
BACKEND
BACKEND
3.decouplingfailures?
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
LOAD BALANCER
LOAD BALANCER
User
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
BACKEND
whatif…
messagebroker
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
User
BACKEND
scaleidependently✅
User
BACKEND
User
BACKEND
BACKEND BACKEND
BACKEND
User
BACKEND
BACKEND BACKEND
BACKEND
canhandlefailures✅
User
BACKEND
whataboutautomaticscaling?
Mesos
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
1.opensource
1.opensource
2.multi-cloud
1.opensource
2.multi-cloud
3.designedtoscale
scaleidependently
canhandlefailures
automaticscaling
scaleidependently✅
canhandlefailures
automaticscaling
scaleidependently✅
canhandlefailures✅
automaticscaling
scaleidependently✅
canhandlefailures✅
automaticscaling✅
soundslikeaplan
demo
theapp
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
containers,containers,containers
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
JAR
XML
+
JAR
XML
JCE+ +
JAR
XML
JCE+ +
CONTAINER
deployingappsin
kubernetes
FRONTEND FRONTEND BACKEND
Incoming
traffic
FRONTEND FRONTEND BACKEND
Incoming
traffic
FRONTEND FRONTEND BACKEND ACTIVEMQ
Incoming
traffic
FRONTEND FRONTEND BACKEND ACTIVEMQ
Incoming
traffic
Autoscaling Group
FRONTEND FRONTEND
Front-end service
BACKEND
Backend service Queue service
ACTIVEMQ
Incoming
traffic
Autoscaling Group
FRONTEND
Pod 1
FRONTEND
Pod 2
Front-end service
BACKEND
Pod 3
Backend service
ACTIVEMQ
Pod 4
Incoming
traffic
Queue service
Autoscaling Group
FRONTEND
Pod 1
FRONTEND
Pod 2
Front-end service
Horizontal Pod Autoscaling
BACKEND
Pod 3
Backend service
ACTIVEMQ
Pod 4
Incoming
traffic
Queue service
lessonslearned
1.scalingink8s
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
2.besttetrisplayerever
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
3.kubernetes==restapi
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
thanks
waitthere'smore?
https://learnk8s.io/blog/scaling-spring-boot-microservices
https://github.com/learnk8s/spring-boot-k8s-hpa
https://learnk8s.io/training
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Node 2
APP
Pod 1
APP
Pod 2
APP
Pod 3
APP
Pod 4
Node 1 Node 3
Node 2
APP
Pod 1
APP
Pod 2
APP
Pod 3
APP
Pod 4
Node 1 Node 3
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
Scaling Microservices with Message Queues, Spring Boot and Kubernetes
questions?

More Related Content

PDF
Rails Testing on Fargate
PDF
serverless framework + AWS Lambda with Python
PPTX
KubeCon Recap for Istio and K8s network performance @Kubernetes Meetup #11
PDF
Architecting on Alibaba Cloud - 超基礎編 -
PDF
生物データベース論(スケーラビリティと可用性)
PPTX
ウェブチップス勉強会 Action cable
PDF
JOSUG2014 OpenStack 4th birthday party in Japan; the way of OpenStack API Dragon
PDF
さくらのDockerコンテナホスティング-Arukasの解説とインフラを支える技術(July Tech Festa 2016 『IoTxAIxインフラ時代...
Rails Testing on Fargate
serverless framework + AWS Lambda with Python
KubeCon Recap for Istio and K8s network performance @Kubernetes Meetup #11
Architecting on Alibaba Cloud - 超基礎編 -
生物データベース論(スケーラビリティと可用性)
ウェブチップス勉強会 Action cable
JOSUG2014 OpenStack 4th birthday party in Japan; the way of OpenStack API Dragon
さくらのDockerコンテナホスティング-Arukasの解説とインフラを支える技術(July Tech Festa 2016 『IoTxAIxインフラ時代...

Similar to Scaling Microservices with Message Queues, Spring Boot and Kubernetes (20)

PDF
Kubernetes on Alibaba Cloud
PPTX
Project calico introduction - OpenStack最新情報セミナー 2017年7月
PPT
インフラエンジニアのためのcassandra入門
PDF
大規模化するピグライフを支えるインフラ ~MongoDBとChefについて~ (後編)
PDF
CloudFront構築事例 ハートビーツ 20121025
PDF
サーバの構築作業や運用管理を自動化する「Chef」 (CADC研究レポート発表LT)
PDF
Using Chef for Infrastructure Automation of Ameba Pigg
PDF
We Should Know About in this SocialNetwork Era 2011_1112
PDF
PaaSの作り方 Sqaleの場合
PDF
RoRとAWSで100,000Req/Minを処理する
PDF
Devops @ Gengo -- AWS日本語初会議
PDF
Info talk #36
PDF
カンタン画像サムネイル作成「Smalllight」
PDF
20150803 baas meetup
KEY
Web Operations and Perl kansai.pm#14
PDF
Riakはなぜ良いのか
PDF
SSDとTokyoTyrantやMySQLの性能検証
PDF
2015-01-27 Introduction to Docker
PDF
2014_0206 aws startup_tech
PDF
Azure 高速サイトソリューション
Kubernetes on Alibaba Cloud
Project calico introduction - OpenStack最新情報セミナー 2017年7月
インフラエンジニアのためのcassandra入門
大規模化するピグライフを支えるインフラ ~MongoDBとChefについて~ (後編)
CloudFront構築事例 ハートビーツ 20121025
サーバの構築作業や運用管理を自動化する「Chef」 (CADC研究レポート発表LT)
Using Chef for Infrastructure Automation of Ameba Pigg
We Should Know About in this SocialNetwork Era 2011_1112
PaaSの作り方 Sqaleの場合
RoRとAWSで100,000Req/Minを処理する
Devops @ Gengo -- AWS日本語初会議
Info talk #36
カンタン画像サムネイル作成「Smalllight」
20150803 baas meetup
Web Operations and Perl kansai.pm#14
Riakはなぜ良いのか
SSDとTokyoTyrantやMySQLの性能検証
2015-01-27 Introduction to Docker
2014_0206 aws startup_tech
Azure 高速サイトソリューション
Ad

Scaling Microservices with Message Queues, Spring Boot and Kubernetes