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
380
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
45
FileSystems em Ruby com FUSE
celsocrivelaro
2
55
Padrões e Boas Práticas de Teste de Tela
celsocrivelaro
0
390
Projeto de APIs
celsocrivelaro
0
140
Testing Network Conditions with ToxiProxy
celsocrivelaro
1
330
Testing Network Conditions with ToxiProxy
celsocrivelaro
0
77
Actor Model in Ruby
celsocrivelaro
0
230
Separando as regras de negócios do Rails
celsocrivelaro
0
170
Other Decks in Technology
See All in Technology
楽しくGoを学び合う、LayerXの勉強会文化 / LayerX's study culture of having fun and learning Go together
ar_tama
2
350
テスト・設計研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
170
AWS IAMのアンチパターン/AWSが考える最低権限実現へのアプローチ概略(JAWS-UG朝会#59資料改修20分版)
htan
0
330
「単なる OAuth 2.0 を認証に使うと、車が通れるほどのどでかいセキュリティー・ホールができる」のか検証してみた
terara
0
380
成長期に歩みを止めないための創業期の開発文化形成
mayah
6
420
LINE WORKSへ簡単通知!Incoming Webhookアプリの紹介
mmclsntr
0
110
Github Actions 로 Android 팀의 효율성 극대화
hadonghyun
0
160
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
ソフトウェアエンジニアリングの知見を活かして データ基盤をいい感じにする on Snowflake [MIERUNE BBQ #10]
mtpooh
2
150
Flutter研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
160
「我々はどこに向かっているのか」を問い続けるための仕組みづくり / Establishing a System for Continuous Inquiry about where we are
daitasu
0
170
たくさん本を読んだけど 1年後には綺麗サッパリ!を乗り越えて 学習の鬼になるぞ👹
yum3
0
160
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
166
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
35
6.3k
Making Projects Easy
brettharned
111
5.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
39
47k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
129
32k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
Adopting Sorbet at Scale
ufuk
71
8.8k
Designing for humans not robots
tammielis
247
25k
Designing with Data
zakiwarfel
96
5k
Imperfection Machines: The Place of Print at Facebook
scottboms
262
13k
How GitHub Uses GitHub to Build GitHub
holman
471
290k
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]