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
55
Lessons We Learned Through Hell When Scaling Blibli.com
bertzzie
0
220
Introduction to GraalVM
bertzzie
0
150
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
600
Other Decks in Technology
See All in Technology
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
10
1.5k
Cloud Spanner 導入で実現した快適な開発と運用について
colopl
1
320
管理者しか知らないOutlookの裏側のAIを覗く#AzureTravelers
hirotomotaguchi
2
320
2.5Dモデルのすべて
yu4u
2
790
次世代KYC活動報告 / 20250219-BizDay17-KYC-nextgen
oidfj
0
150
トラシューアニマルになろう ~開発者だからこそできる、安定したサービス作りの秘訣~
jacopen
2
1.8k
エンジニアの育成を支える爆速フィードバック文化
sansantech
PRO
3
990
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
2
1.3k
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
3
920
Postmanを使いこなす!2025年ぜひとも押さえておきたいPostmanの10の機能
nagix
2
140
Postman Flowsの基本 / Postman Flows Basics
yokawasa
1
100
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
130
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
KATA
mclloyd
29
14k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Producing Creativity
orderedlist
PRO
343
39k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
What's in a price? How to price your products and services
michaelherold
244
12k
Six Lessons from altMBA
skipperchong
27
3.6k
The Invisible Side of Design
smashingmag
299
50k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Agile that works and the tools we love
rasmusluckow
328
21k
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