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
410
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
210
Big Data para Gerentes de Projetos
celsocrivelaro
0
45
FileSystems em Ruby com FUSE
celsocrivelaro
2
57
Padrões e Boas Práticas de Teste de Tela
celsocrivelaro
0
400
Projeto de APIs
celsocrivelaro
0
140
Testing Network Conditions with ToxiProxy
celsocrivelaro
1
350
Testing Network Conditions with ToxiProxy
celsocrivelaro
0
79
Actor Model in Ruby
celsocrivelaro
0
240
Separando as regras de negócios do Rails
celsocrivelaro
0
180
Other Decks in Technology
See All in Technology
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
670
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
150
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
非機能品質を作り込むための実践アーキテクチャ
knih
3
840
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
210
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
250
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
240
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
140
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
GraphQLとの向き合い方2022年版
quramy
44
13k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Thoughts on Productivity
jonyablonski
67
4.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building Your Own Lightsaber
phodgson
103
6.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Making the Leap to Tech Lead
cromwellryan
133
9k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
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]