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
75
The Future of Working in IT
bertzzie
1
90
Dependency Injection in Spring
bertzzie
0
81
Scala: Lessons Learned from the Battlefield
bertzzie
0
75
Lessons We Learned Through Hell When Scaling Blibli.com
bertzzie
0
240
Introduction to GraalVM
bertzzie
0
160
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
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
150
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
150
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
120
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
180
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
1
130
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3k
AWS Network Firewall Proxyを触ってみた
nagisa53
1
210
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
160
What happened to RubyGems and what can we learn?
mikemcquaid
0
280
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Marketing to machines
jonoalderson
1
4.6k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
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