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
Ludicrous speed
Search
Sergey Vysotskiy
December 09, 2014
Technology
0
29
Ludicrous speed
Fantastic stories about performance requirements
Sergey Vysotskiy
December 09, 2014
Tweet
Share
More Decks by Sergey Vysotskiy
See All by Sergey Vysotskiy
Embracing the Imposter
ggame
0
42
Pressing Play at Spotify
ggame
0
61
Testing for capacity
ggame
2
220
Software Industry 101 (2013 season): Красочный мир тестирования
ggame
0
110
Latency
ggame
1
160
Швейцарский нож для Android
ggame
0
270
Анатомия ошибки
ggame
0
290
Other Decks in Technology
See All in Technology
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
320
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
230
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
260
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
500
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
760
Working as a Server-side Engineer at LY Corporation
lycorp_recruit_jp
0
300
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
420
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
190
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
120
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
370
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
GraphQLとの向き合い方2022年版
quramy
44
13k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Designing for Performance
lara
604
68k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Rails Girls Zürich Keynote
gr2m
94
13k
Faster Mobile Websites
deanohume
305
30k
Bash Introduction
62gerente
609
210k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Cult of Friendly URLs
andyhume
78
6.1k
Transcript
fantastic stories about performance requirements Ludicrous Speed
None
None
None
None
None
PANIC!
Modern human experimentations
None
None
Big business impact Big response delay
No silver bullets today
Perception of time What happens on internets? What is “OK”
response time? What is “OK” load? Summary PLAN
Perception of time What happens on internets? What is “OK”
response time? What is “OK” load? Summary PLAN
Perception of time What happens on internets? What is “OK”
response time? What is “OK” load? Summary PLAN
Perception of time What happens on internets? What is “OK”
response time? What is “OK” load? Summary PLAN
Perception of time What happens on internets? What is “OK”
response time? What is “OK” load? Summary PLAN
Perception Of Time
100-200 ms 500-1000 ms 2-5 seconds 7-10 seconds instantaneous reaction
uninterrupted reaction some reaction oof…
100-200 ms 500-1000 ms 2-5 seconds 7-10 seconds instantaneous reaction
uninterrupted reaction some reaction oof…
100-200 ms 500-1000 ms 2-5 seconds 7-10 seconds instantaneous reaction
uninterrupted reaction some reaction oof…
100-200 ms 500-1000 ms 2-5 seconds 7-10 seconds instantaneous reaction
uninterrupted reaction some reaction oof…
100-200 ms 500-1000 ms 2-5 seconds 7-10 seconds instantaneous reaction
uninterrupted reaction some reaction oof… *20 years old data
Modern data?
3… may be 5 seconds max
3… may be 5 seconds max Even faster in future
Weber–Fechner law 1 2
Weber–Fechner law 1 2
Weber–Fechner law 1 2
Weber–Fechner law 1 2
Weber–Fechner law 1 2 just noticeable difference (jnd)
Weber–Fechner law just noticeable difference (jnd) For time lengths of
up to 30s - jnd is somewhere between 7% and 18%
Weber–Fechner law Faster Slower
Weber–Fechner law 20s Faster Slower
Weber–Fechner law 20s 24s 16s -20% +20% Faster Slower
“Slightly” faster
Perception of average between t1 and t2 is: sqrt(t1*t2)
Example
Benchmark against 30s 60s less than 36s less than 42s
less than 24s slow same slightly slower faster
Benchmark against 30s 60s less than 36s less than 42s
less than 24s slow same slightly slower faster
Benchmark against 30s 60s less than 36s less than 42s
less than 24s slow same slightly slower faster
Benchmark against 30s 60s less than 36s less than 42s
less than 24s slow same slightly slower definitely faster
Is it worth to optimise? Target performance Unnoticeable degradation
Is it worth to optimise? Target performance Unnoticeable degradation
Is it worth to optimise? Target performance Unnoticeable degradation
Why so serious?
Why so serious?
What Happens on Internets?
None
None
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering on browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering on browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering on browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering on browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering on browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering on browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering in a browser
Response time: DNS request Establish TCP connection Generate request to
server Send request to server Server generates response Server sends response Page rendering in a browser
Fun facts! Min time to pass 1/2 of globe: 67ms
Later ;) Server generates response
Let’s talk a bit about that Page rendering in a
browser
In a complex projects 60% of time could be easily
spent on rendering
There’s space to optimise
There’s space to optimise
There’s space to optimise
Time budget: Load and render critical parts first
What Is “OK” Response?
It depends
In general case response longer than 300ms means nobody cares
In general case response longer than 300ms means nobody cares
Usually it’s more than 1 second on a client
It should be fast
It should be fast Bad requirement
It should be faster than 300ms
It should be faster than 300ms Bad requirement
Long tail
95% < 300ms 99% < 500ms
95% < 300ms 99% < 500ms
95% < 300ms 99% < 500ms OK requirement
95% < 300ms 99% < 500ms OK requirement But still
depends
Remember about 20% difference!
Remember to measure competitors!
Oof… Done with time!
Oof… Done with time! There are 1 more to go
What Is “OK” Load?
What measurement units to use?
What is “average user”?
“Average human” have less than 1 arm
Requests Per Second (RPS) is what server understands
How much RPS we should be able to handle?
EXTREMELY HARD QUESTION
Pulse of the Web
Spotify Average Monday in Stockholm
Spotify Specific Monday in Stockholm
None
None
None
None
Spotify Average Monday in Eastern US
Financial Times weekly traffic changes
Financial Times weekly traffic changes Extremely different for different clients
Financial Times weekly traffic changes Extreme daily features
Thanksgiving in US Events could make a big difference
Bombing in Moscow subway 29 march 2010
Bombing in Moscow subway 29 march 2010 First explosion 7:57
Load growth 8:10
Think like a user Look for daily/weakly/yearly cycles
Think like a user Look for daily/weakly/yearly cycles
Event based service? Prepare for extremely huge spikes
Do closed beta And watch for load profile
It’s growing
Very Short Summary
Find out what is OK response time for you Remember
about long tail Find out possible max load Test your assumptions
Find out what is OK response time for you Remember
about long tail Find out possible max load Test your assumptions
Find out what is OK response time for you Remember
about long tail Find out possible max load Test your assumptions
Find out what is OK response time for you Remember
about long tail Find out possible max load Test your assumptions
APPLAUSE
QUESTIONS?
Magic Numbers Some
4 datacenters More than 5K servers ~50 millions of unique
users More than 100 people working on backend infrastructure and operations
DATACENTERS: Ashburn San Jose Stockholm London
QUESTIONS?
Sergey Vysotskiy
[email protected]