Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Microservices Challenges
Search
Gustavo Pantuza
April 01, 2019
Programming
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Microservices Challenges
This presentation approaches many challenges moving forward Microservices
Gustavo Pantuza
April 01, 2019
More Decks by Gustavo Pantuza
See All by Gustavo Pantuza
Roteamento distribuído para Satélites de baixa órbita através do protocolo GPSR
pantuza
0
19
Observability Engineering: os protocolos, a comunidade e o estado da arte
pantuza
3
270
[Kubecon Europe 2023] Ingesting 6.5 Tb of Telemetry Data Daily Through Open Telemetry Protocol and Collectors
pantuza
0
640
Projeto experimental comparando gRPC e Thrift
pantuza
0
120
eQUIC Gateway: Maximizing QUIC throughput using a Gateway Service based on eBPF + XDP
pantuza
0
650
Danian: tail latency reduction of networking application through an O(1) scheduler
pantuza
0
290
Wrapping C libraries into Python modules
pantuza
0
410
Computação Serverless: Conceitos, Aplicações e Desafios
pantuza
0
270
Makefile, automating daily tasks & simplifying Gettings Started
pantuza
3
1.1k
Other Decks in Programming
See All in Programming
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.4k
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
770
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.6k
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
140
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
670
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
数百円から始めるRuby電子工作
tarosay
0
140
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
120
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
360
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
790
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
380
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
440
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
HDC tutorial
michielstock
2
790
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
360
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
370
YesSQL, Process and Tooling at Scale
rocio
174
15k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
640
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Transcript
Gustavo Pantuza Microservices Challenges
None
Agenda Context Considerations Use cases
Monolith
Monolith • Big code base • Difficult to scale •
Easy to monitor/troubleshoot • Many responsibilities • Complex to deploy
microservice
Microservice • Small code base • Single responsibility • Complex
to troubleshoot • Complex to monitor • Easier to test and deploy
None
None
Microservices challenges Step 1 Application example Step 2 Show a
problem Step 3 Propose a solution
Circuit breaker Step 1
Step 2 If the microservices I integrate fail, how can
I guarantee my authentication system? Circuit breaker
Step 3 If x% of failure send emails to guarantee
authentication Circuit breaker
Scale Step 1
Scale Step 2 How to increase load without saturate computational
resources?
Scale Step 3 Horizontal auto scale CPU: 50% CPU: 95%
CPU: 85% CPU: 50% CPU: 50%
Scale Step 3 $> kubectl autoscale \ deployment php-apache \
--cpu-percent=50 \ --min=1 \ --max=10
Freshness Step 1
Step 2 Content must be updated and ever been shown
to end users Freshness
Step 3 Cache pipeline Proactive purge Freshness
Passo 1 Integration
Passo 2 Integration How to add new applications without changing
my previous services?
Passo 3 Integration • APIs Agregation • Enforce availability on
BFF BFF - Backend for Front-end
Reliability Step 1 API
Step 2 If my service becomes unavailable what my clients
should do? Reliability
Step 3 Retry Backoff Cache Reliability
Capacity Step 1 Varnish
Capacity Step 2 As traffic grows system starts paginating and
denying connections
User space Capacity Step 3 Turn off swap TCP/IP tuning
Kernel space Operating system Tuning . swapoff --all . sysctl -w net.ipv4.tcp_fin_timeout=15
Monitoring Step 1
Monitoring Step 2 How to minimize failure detection and recovery
time?
Monitoring Step 3 • Zabbix • cachet Feedback system •
Prometheus • Graylog
Design Step 1
Step 2 Software changes should not impact all clients Design
Step 3 Tenants Design USD BRL EUR . Extensibility .
Customizable
Communication Step 1 APIs
Passo 2 How to compute votes and minimize response time?
Communication
Passo 3 Buffer in memory 1000 votes or 10 seconds
... Communication
Distribution Step 1
Distribution Step 2 How to avoid a single point of
failure?
Distribution Step 1 Application distribution over network PoDs
Availability Step 1 A B C D E F G
H Application servers/containers
Availability Step 2 How to evenly distribute load over all
application servers/containers?
Availability Step 3 Load balancing A B C D E
F G H • IPVS • Neutrino • HAProxy • Nginx L4 L7
DRY Step 1 A B C D Authentication Authorization
Step 2 How to avoid repeating computations on many services?
DRY
Step 3 API Gateway DRY A B C D G
Kong HQ
Step 1 Interfaces { "what": "A json example", "test": true,
"values": [42, 10, 5.32], "data": { "name": "Test Name", "type": null } }
Step 2 How to change my services contracts without breaking
my clients integration? Interfaces
Step 3 Generic and versioned Interfaces Interfaces . JSON Schema
. ProtoBuffers /* Proto Buffers */ message Example { string what = 1; boolean test = 2; repeated int32 values = 3; optional DataMessage data = 4; } message DataMessage { string name = 1; optional string type = 2; }
Step 1 Networking
Step 2 How to deploy multiple microservices clusters and do
not collide sub-networks? Networking
Step 3 Overlay networking . KubeRouter . VXLAN . Open
vSwitch . IPIP tunnel . GRE Networking Subnet: 10.0.10.0/24 Subnet: 10.0.10.0/24 vRouter: 192.168.0.100/32 vRouter: 192.168.0.200/32
Step 1 Filtering Host Hypervisor VMs
Step 2 How to filter traffic without overloading network equipments?
Filtering
Step 3 Software Defined Networking . Open vSwitch . Netfilter/IP
tables Filtering Host Hypervisor VMs OvS
Step 1 A B C D Tracing
Step 2 How to know which service has failed? Tracing
Step 3 Tracing X-Request-ID GET /myservice/myresource HTTP/1.1 Host: myservername X-Request-ID:
30f14c6c1fc85cba12bfd093aa8f90e3 Accept: */* A B C D Request Identification
None
Questions? https://blog.pantuza.com https://github.com/pantuza https://twitter.com/gpantuza