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
High Performance Architecture Patterns
Search
Celso Crivelaro
May 12, 2016
Technology
1
370
High Performance Architecture Patterns
Celso Crivelaro
May 12, 2016
Tweet
Share
More Decks by Celso Crivelaro
See All by Celso Crivelaro
Sistemas de Recomendação
celsocrivelaro
2
200
Big Data para Gerentes de Projetos
celsocrivelaro
0
41
FileSystems em Ruby com FUSE
celsocrivelaro
2
54
Padrões e Boas Práticas de Teste de Tela
celsocrivelaro
0
350
Projeto de APIs
celsocrivelaro
0
140
Testing Network Conditions with ToxiProxy
celsocrivelaro
1
300
Testing Network Conditions with ToxiProxy
celsocrivelaro
0
76
Actor Model in Ruby
celsocrivelaro
0
220
Separando as regras de negócios do Rails
celsocrivelaro
0
170
Other Decks in Technology
See All in Technology
20240416_devopsdaystokyo
kzkmaeda
1
190
Hands-on / Kaname Frusawa / Cloud Compare Users Meetup 2024 at University of Tokyo on April 17
paraworld
2
470
Tebiki株式会社 エンジニア採用資料
tebiki
0
4.1k
Terraformあれやこれ/terraform-this-and-that
emiki
6
590
人間の尊厳、幸福、アクセシビリティ / 第116回「WEB TOUCH MEETING」アクセシビリティSP
nulabinc
PRO
2
180
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
130
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
700
Four keys改善の取り組み事例紹介
sansantech
PRO
3
230
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
オーナーシップを持つ領域を明確にする
konifar
12
2.7k
OpenTelemetry を使ったトレースエグザンプラーの活用 / otel-trace-exemplar
k6s4i53rx
2
640
2024/4/26 コンピュータ歴史博物館解説告知
toshi_atsumi
0
200
Featured
See All Featured
Producing Creativity
orderedlist
PRO
336
39k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.5k
Building an army of robots
kneath
300
41k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Designing Experiences People Love
moore
136
23k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
The Power of CSS Pseudo Elements
geoffreycrofte
59
5k
Docker and Python
trallard
33
2.7k
Gamification - CAS2011
davidbonilla
76
4.6k
How to Ace a Technical Interview
jacobian
272
22k
Web Components: a chance to create the future
zenorocha
305
41k
Transcript
High Performance Architecture Patterns Celso Crivelaro @celsocrivelaro
$ whoami > Celso Crivelaro - Engineer and MSc in
Computer Engineering - Dev Ruby / Python / Java @celsocrivelaro http://crivelaro.me
None
None
SMTP Locaweb - Transaction email platform - Fast and high
quality email sending - Live reports - Integration by SMTP Protocol and HTTP API - 2,5 Millions of messages per day - + 2 years
None
Platforms
None
None
None
None
High Availability
Resource Consumption
None
Disk Memory Band- width Processor time Logs GC Open Connections
Deadlocks Stop all disk activities Swap Slowness Services stop responding Queues Amount Workers Slowness
Integrations
Integrations always fails!
Integration Fails always Internal External DB API Storage Network API
ISP Hop Cloud
Map hidden integrations E.g. DNS
Fail Fast
Failing Fast reduces transient errors
Timeouts
Never trust in default timeouts
Threads Timeouts to get rid of deadlocls Internal Little timeout
External Depends: The least possible
Retry
1 2 3 5 8 n Fibonacci Proportion ...
Isolate Critical Components
Panel / API Painel Web Internal API - HTTP Resources
Connection Pool App Server Business Rules Integrations
App Internal API App Panel Painel Web API - HTTP
Resources Conn. Pool App Server Business Rules Integrations Resources Conn. Pool App Server Business Rules Integrations
Less Components == Less Problems
None
Redundancy
Health Check
None
None
Scalability
CAP Theorem
Availability Consistency Tolerance to network partition
Availability Consistency Partition Tolerance to network partition whether system is
available or not
Availability Consistency Tolerance to network partition Same data in all
nodes
Availability Consistency Tolerance to network partition Tolerante when a network
fails
Availability Consistency Partition Tolerance Postgres
Availability Consistency Partition Tolerance DNS
Availability Consistency Partition Tolerance Protocols
Evaluate which one is acceptable to your platform
Pool of Resources
App Connection Resource Connection Connection Connection Connection
Controlled Timeouts Controlled Resource Consumption Avoid opening/closing connections overhead
Cache
Make your data closer to your app
When use cache App API DB
Default Cache Strategy App Cache Source 1 2 3
Hot Cache Strategy App Cache Source 2 1
Load Balacing
LB App App App App
Load Balance Strategy matters!
Decoupled Architecture
Slow Processing Fast processing Asynchronous Processing Authentication Message Transformation MTA
Providers User Message Persistence Consolidation
Background jobs Messaging frameworks
How to discover bottlenecks?
Test your limits... Load Test Stress Test Peak Test
Telemetry
None
Grafana + InfluxDB
Other scalabity patterns
Indexes
Sharding
References
None
None
None
http://use-the-index-luke.com
None
Thank you! Celso Crivelaro @celsocrivelaro
[email protected]