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
Handling Scale with Reactive Programming
Search
Alex Xandra Albert Sim
September 29, 2018
Technology
0
110
Handling Scale with Reactive Programming
Summary of reactive programming concept and basics
Alex Xandra Albert Sim
September 29, 2018
Tweet
Share
More Decks by Alex Xandra Albert Sim
See All by Alex Xandra Albert Sim
System Operations
bertzzie
0
48
The Future of Working in IT
bertzzie
1
86
Dependency Injection in Spring
bertzzie
0
72
Scala: Lessons Learned from the Battlefield
bertzzie
0
58
Lessons We Learned Through Hell When Scaling Blibli.com
bertzzie
0
220
Introduction to GraalVM
bertzzie
0
160
Building Fintech App in Java: Tips & Trick
bertzzie
0
160
Scaling Software Architecture: 101 and Best Practices
bertzzie
0
220
Spring Cloud Contract Introduction
bertzzie
0
610
Other Decks in Technology
See All in Technology
AWS CDK コントリビュート はじめの一歩
yendoooo
1
120
Redefine_Possible
upsider_tech
0
230
Go製のマイグレーションツールの git-schemalex の紹介と運用方法
shinnosuke_kishida
1
370
これからクラウドエンジニアになるために本当に必要なスキル 5選
hiyanger
1
460
Tirez profit de Messenger pour améliorer votre architecture
tucksaun
1
120
KCD Brazil '25: Enabling Developers with Dapr & Backstage
salaboy
1
120
コード品質向上で得られる効果と実践的取り組み
ham0215
1
200
ソフトウェア開発現代史: なぜ日本のソフトウェア開発は「滝」なのか?製造業の成功体験とのギャップ #jassttokyo
takabow
2
1.5k
Symfony in 2025: Scaling to 0
fabpot
2
150
LINE Notify互換のボットを作った話
kenichirokimura
0
170
Road to SRE NEXT@仙台 IVRyの組織の形とSLO運用の現状
abnoumaru
0
380
DevOps文化を育むQA 〜カルチャーバブルを生み出す戦略〜 / 20250317 Atsushi Funahashi
shift_evolve
1
110
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
41
2.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Code Reviewing Like a Champion
maltzj
522
39k
Scaling GitHub
holman
459
140k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
KATA
mclloyd
29
14k
GraphQLの誤解/rethinking-graphql
sonatard
70
10k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
For a Future-Friendly Web
brad_frost
176
9.6k
Transcript
Handling Scale with Reactive Programming Alex Xandra Albert Sim
Disclaimer Presentations are intended for educational purposes only and not
to replace independent professional judgment. The views and opinions expressed in this presentation do not necessarily reflect the official policy or position of blibli.com. Audience discretion is advised.
Who am I? • Alex Xandra Albert Sim • Principal
Research and Development Engineer at blibli.com • alex.sim@gdn-commerce.com • bertzzie(.sim)
Reactive Manifesto
Reactive Manifesto A good reactive systems are: • Responsive •
Resilient • Elastic • Message Driven
Reactive Manifesto A good reactive systems are: • Responsive •
Resilient • Elastic • Message Driven
Reactive Manifesto A good reactive systems are: • Responsive •
Resilient • Elastic • Message Driven
Reactive Manifesto A good reactive systems are: • Responsive •
Resilient • Elastic • Message Driven
Reactive Manifesto A good reactive systems are: • Responsive •
Resilient • Elastic • Message Driven
ACHIEVING RESPONSIVENESS
The Classic Web Architecture
The Classic Web Architecture
The Normal Flow Users Internet Web app (tomcat, netty, php,
etc) Application process
What’s in “application process”?
Classical Code Sample
Classical Code Sample
Potensi Bottleneck
Little’s Law ! = # × % L : Jumlah
koneksi ke database λ : Load dari request W : Waktu respons database
Little’s Law (Contoh) Untuk kasus di mana: • Terdapat 500
request / detik • Database memberikan response dalam 30ms • Jumlah koneksi db yang diperlukan adalah 15 L = λ x W L = 500 rps x 0.03s L = 15
Alur Kehancuran Sistem (1)
Solusi? • Naikkan jumlah pool / queue? • NO, karena
hanya membantu di average case • Kenapa? • DB down 1 menit, 500 rps tetap masuk
Solusi 1
Solusi 2
Solusi Queue • Membuat sistem konsisten. • Misal: 3 queue
berarti sistem akan memberikan respon max 120ms • Average menurun, tapi lebih stabil • Belum hitung cache! • + cache rate 50%, average bisa < 50ms
Queue dan Timeout • Timeout == batas sistem dianggap gagal
• Request tidak selalu terdistribusi rapi • Average tidak sepenting Max Response Time
ON PARALLELISM
Sequential Execution Start a b c Result Latency
Parallel Execution Latency Start a b c Result
Composable Future
Keterbatasan Parallelisme
Keterbatasan Parallelisme
What we miss L • Resilience: Compartmentalization • Resilience: Circuit
Breaker • Resilience: Supervision pattern • Message passing • Actor system • BASE Pattern
Maybe next time!
QUESTION AND ANSWERS
Come with us. We have cookies.
Thank You