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
120
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
61
The Future of Working in IT
bertzzie
1
88
Dependency Injection in Spring
bertzzie
0
75
Scala: Lessons Learned from the Battlefield
bertzzie
0
64
Lessons We Learned Through Hell When Scaling Blibli.com
bertzzie
0
230
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
630
Other Decks in Technology
See All in Technology
多様なニーズに応える Movable Type ラインナップ 全紹介
masakah
0
120
LLMをツールからプラットフォームへ〜Ai Workforceの戦略〜 #BetAIDay
layerx
PRO
1
830
Vision Language Modelと自動運転AIの最前線_20250730
yuyamaguchi
3
1.1k
Rubyの国のPerlMonger
anatofuz
3
720
マルチモーダル基盤モデルに基づく動画と音の解析技術
lycorptech_jp
PRO
4
480
【CEDEC2025】『Shadowverse: Worlds Beyond』二度目のDCG開発でゲームをリデザインする~遊びやすさと競技性の両立~
cygames
PRO
1
280
金融サービスにおける高速な価値提供とAIの役割 #BetAIDay
layerx
PRO
1
710
KubeCon + CloudNativeCon Japan 2025 Recap
donkomura
0
150
製造業の課題解決に向けた機械学習の活用と、製造業特化LLM開発への挑戦
knt44kw
0
150
クマ×共生 HACKATHON - 熊対策を『特別な行動」から「生活の一部」に -
pharaohkj
0
290
Strands Agents & Bedrock AgentCoreを1分でおさらい
minorun365
PRO
6
220
Nx × AI によるモノレポ活用 〜コードジェネレーター編〜
puku0x
0
320
Featured
See All Featured
How to Ace a Technical Interview
jacobian
278
23k
How to train your dragon (web standard)
notwaldorf
96
6.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Six Lessons from altMBA
skipperchong
28
3.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Faster Mobile Websites
deanohume
308
31k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
The Cost Of JavaScript in 2023
addyosmani
51
8.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
A designer walks into a library…
pauljervisheath
207
24k
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