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
React Routerで実現する型安全なSPAルーティング
sansantech
PRO
2
230
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
170
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
280
C++26 エラー性動作
faithandbrave
2
810
Work as an App Engineer
lycorp_recruit_jp
0
330
Working as a Server-side Engineer at LY Corporation
lycorp_recruit_jp
0
330
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
770
AWS re:Invent 2024で発表された コードを書く開発者向け機能について
maruto
0
210
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
170
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
310
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
230
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Making Projects Easy
brettharned
116
6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Fireside Chat
paigeccino
34
3.1k
A Tale of Four Properties
chriscoyier
157
23k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.6k
Testing 201, or: Great Expectations
jmmastey
41
7.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Building an army of robots
kneath
302
44k
Designing for Performance
lara
604
68k
Facilitating Awesome Meetings
lara
50
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]