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
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Handling Scale with Reactive Programming
Summary of reactive programming concept and basics
Alex Xandra Albert Sim
September 29, 2018
More Decks by Alex Xandra Albert Sim
See All by Alex Xandra Albert Sim
System Operations
bertzzie
0
82
The Future of Working in IT
bertzzie
1
100
Dependency Injection in Spring
bertzzie
0
88
Scala: Lessons Learned from the Battlefield
bertzzie
0
81
Lessons We Learned Through Hell When Scaling Blibli.com
bertzzie
0
250
Introduction to GraalVM
bertzzie
0
170
Building Fintech App in Java: Tips & Trick
bertzzie
0
170
Scaling Software Architecture: 101 and Best Practices
bertzzie
0
230
Spring Cloud Contract Introduction
bertzzie
0
650
Other Decks in Technology
See All in Technology
Kiro Ambassador を目指す話
k_adachi_01
0
110
人材育成分科会.pdf
_awache
4
300
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
160
自宅LLMの話
jacopen
1
690
Bucharest Tech Week 2026 - Guardians of the Cloud-Native Galaxy
edeandrea
PRO
0
130
FPGAの開発コンペでZephyrを使ってみた
iotengineer22
0
160
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
380
徹底討論!ECS vs EKS!
daitak
3
1.1k
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
9
1.4k
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
140
インシデントレスポンス演習 I / Incident Response Exercise I
ks91
PRO
0
100
Lightning近況報告
kozy4324
0
210
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
A better future with KSS
kneath
240
18k
Statistics for Hackers
jakevdp
799
230k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Curse of the Amulet
leimatthew05
1
13k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
How to Talk to Developers About Accessibility
jct
2
240
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Google's AI Overviews - The New Search
badams
0
1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
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 •
[email protected]
• 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