Scalability
Skeepers Influence Workshop
Your HOsts Tonight
What We Will See
🚀 What is scalability
🪜 Definition of scalability
The capacity to be changed in size or scale.
The ability of a computing process to be used or produced in a range of capabilities.
⛷️ Scale Up and Down!
📚 Use in Literature
🐧 Example: Linux
✋ What makes something Scalable?
- Scarcity of a resource
- Growing wait times
- Unability to answer
- Blocking on a resource
- ...
📝 Exercise: non Scalable Service
$ npm install -g loadtest
$ loadtest https://gorest.co.in/public/v1/users -n 2000 -c 100 --keepalive
📝 Exercise +
$ loadtest http://service.pinchito.es:3000/a -n 2000 -c 100 --rps 30 -k
$ loadtest http://service.pinchito.es:3000/a -n 2000 -c 100 --rps 40 -k
$ loadtest http://service.pinchito.es:3000/a -n 2000 -c 100 --rps 1000 -k
📝 Exercise +
📝 Exercise +
loadtest https://www.google.com -n 2000 -c 100 -k
👍 Success!
🥛 What Resource Run out?
🚂 rps vs throughput
📈 Scalability Profiles
🚒 Latency vs rps
⚖️ Little's Law
⇕v and ⇔ h Scaling
🧓 Hard Beginnings
💽 Specialized Servers
🗄️ The Usual Cabins
🤖 And then Google Arrived
⇕ vertical Scaling
Buy a bigger machine
And bigger
Until you run out of machines
Hard to go back to a smaller machine 😅
⇕ vertical Scaling
🤫 Sshhh...
⇔ Horizontal Scaling
Use many similar machines for a given function
("provisioning")
Add or remove machines to scale
When one machine is failing it is removed from service
⇔ horizontal Scaling
📝 Exercise: Storage
Design a corporate storage system with 15 TB
Option 1 ⇕: storage area network (SAN)
Best option as of december 2008
Option 2 ⇔: raw hard drives
📝 EXERCISE +
Final price?
⮯
📝 EXERCISE +
Consider redundancy strategies
Fault tolerance
Redundancy options: 2x, 3x, ?
Consider scaling strategies
How do they affect the price?
⮯
👍 success!
⇔ Horizontal Strategies
🤹 Balancing (server-side)
🕵️ Balancing (client-side)
💝 Affinity
🔱 Independence
🍇 Clustering
🔑 Sharding
🧬 Replication
⌛ Queues
🤹 Server-side Balancing
🕵️ Client-Side Balancing
💝 Affinity ⇔
🔱 Independence ⇔
🍇 Clustering ⇔
🔑 Sharding ⇔
🧬 Replication ⇔
🐫 Active REPLICAtion ⇔
⌛ Queues ⇔
📝 Exercise: Scalable Storage
📝 EXERCISE +
📝 EXERCISE +
📝 EXERCISE +
📝 EXERCISE +
👍 Well done!
📚 Bibliography
Brendan Gregg: Systems Performance: Enterprise and the Cloud
John Allspaw: Web Operations: Keeping the Data On Time
HighScalability.com: Favorite posts on HighScalability
Skeepers Influence Workshop: Distributed Systems
By Alex Fernández
Skeepers Influence Workshop: Distributed Systems
Workshop for Skeepers Influence: Distributed Systems
- 983