Scalable Is Awesome, Literally!

Stockholm, Sweden
June 12, 2015

Garrett Smith / @gar1t

But Will It Scale?

Alternatively

  • Build It
  • Deploy It
  • Observe It
  • Fix It

Gee Thanks

Scalable → Awesome

More fun!

  • Myth Of Scalability
  • Scalability Obsession
  • Patterns

The Myth Of Scalability

Outages

Read about it!

Nothing Scales

Scalable Awesome!

Scalable Suitable

There’s no such thing as fast, only fast enough.
— Joe Armstrong, Inventor of Erlang

Optimization Fixation

Patterns

  • Not a Problem
  • Build It Naive
  • Dependencies Bad
  • Think “System”
  • Physics Not Magic

Not A Problem

Not A Problem… Right Now

Build It Naive

The Unclever Approach

  • Obvious, line-of-sight
  • Usually works
  • Often works forever
  • Cheap
  • Gets you to the actual problems

Pointy Hair Argument

  • Cost of work is almost always under estimated
  • Value of work is often over estimated
  • Keep work as small as possible, improve incrementally

Dependencies Bad

Down, but how?

Fight Dependencies

  • Make due with what you have
  • Fight each dependency until it overwhelms you
  • When forced to give in, do it bitterly

Think “System”

Independencies

  • Boundaries in time and space
  • Not source code abstractions
  • Some language cultures embrace “system”, others do not

Physics Not Magic

Approximate Latencies

L1 cache reference                            0.5 ns
Branch mispredict                             5   ns
L2 cache reference                            7   ns
Mutex lock/unlock                            25   ns
Main memory reference                       100   ns
Compress 1K bytes with Zippy              3,000   ns
Send 1K bytes over 1 Gbps network        10,000   ns
Read 4K randomly from SSD*              150,000   ns
Read 1 MB sequentially from memory      250,000   ns
Round trip within same datacenter       500,000   ns
Read 1 MB sequentially from SSD*      1,000,000   ns
Disk seek                            10,000,000   ns
Read 1 MB sequentially from disk     20,000,000   ns
Send packet CA->Netherlands->CA     150,000,000   ns

Buy These!

Build This!

Final Thoughts

Scalable

Awesome!

Suitable

Evolvable

Discussion

Yell at me on Twitter!

@gar1t