Solving Imaginary Scaling Issues
at scale
DinosaurJS, 2017-06-15
These slides are available in non-vibrating version:
http://slides.com/seldo/solving-imaginary-scaling-issues-at-scale
Who is this dude with the blue hair?
Laurie Voss, COO,
Twitter: @seldo
![](https://s3.amazonaws.com/media-p.slid.es/uploads/seldo/images/707811/npm.png)
Subtitle
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3908998/solvingimaginaryscalingissues.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909038/Screenshot_2017-06-14_17.12.31.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909045/Screenshot_2017-06-14_17.14.23.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909046/Screenshot_2017-06-14_17.14.32.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909047/Screenshot_2017-06-14_17.14.38.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909048/Screenshot_2017-06-14_17.14.50.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909051/Screenshot_2017-06-14_17.14.59.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909052/Screenshot_2017-06-14_17.15.04.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909054/Screenshot_2017-06-14_17.15.13.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909055/Screenshot_2017-06-14_17.15.23.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909056/Screenshot_2017-06-14_17.15.30.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909058/Screenshot_2017-06-14_17.15.38.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909060/Screenshot_2017-06-14_17.15.43.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909061/Screenshot_2017-06-14_17.15.49.png)
Imaginary
Scaling
Problems
22 chapters
in
22 minutes
Performance != Scaling
I'm playing fast and loose.
Chapter 1:
Databases with cool-sounding names
Trust not the marketing pages
especially of database techologies
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Novelty
Chapter 2:
Minifying the JavaScript of your O(n^3) to-do list
Minifying code makes it run sooner
Not faster
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909392/badge-missing-the-point.png)
Missing the point
Chapter 3:
Putting A Node.js Proxy In Front Of your COBOL Backend
Putting a proxy in front of a server slows it down
(usually)
So close
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909399/badge-so-close.png)
Chapter 4:
Fuck it, let's use BitTorrent for everything
BitTorrent is
✨distributed✨
Throughput
is not speed
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Chapter 5:
Running exactly the same software, but in Docker
Docker does not magically make your application better
Rearranging the deck chairs
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909407/badge-deckchairs.png)
Chapter 6:
Splitting everything into 35 microservices all maintained by 1 person
Microservices
help teams scale
Not software
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909392/badge-missing-the-point.png)
Chapter 7:
300% performance boosts by deleting data validity checks
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909383/badge-100.png)
Scale up by giving fewer fucks
Chapter 8:
Fuck it, let's use
✨the blockchain✨
for everything
Blockchains are not general purpose databases
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Chapter 9:
Using protobufs to poll 300 times per second
Don't scale by doing dumb shit faster
Most problems aren't hard
Don't go for extra credit.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909392/badge-missing-the-point.png)
Chapter 10:
Put a cache on it
Some stuff
can't be cached
And it's usually the most important stuff.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909407/badge-deckchairs.png)
Subliminal slide
npm is a company that sells good and services.
Chapter 11:
Rewriting your APIs in C when your payload is 3MB of JSON
Optimize your API before optimizing your code
A badly designed API is slow in any language
Chapter 12:
Fuck it, let's rewrite everything in Go
"Go" is a really hard name to Google
Which is funny 'cause Google invented the damn thing
Rewrites make your code faster
And your team slower
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Chapter 13:
Optimizing your PNGs while hosting 300MB video ads
Not all scaling solutions are technical
https://www.soasta.com/blog/google-mobile-web-performance-study/
Chapter 14:
Blaming everything on the last
person to quit
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909383/badge-100.png)
Chapter 15:
Fuck it, let's try ✨Erlang✨
"Putting the funk in functional programming since 1986"
Functional programming is just different, not better
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Subliminal slide
Private packages from npm
can help your team work faster
Chapter 16:
Sharding your database before adding any indexes
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909435/Screenshot_2017-06-14_22.28.56.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909399/badge-so-close.png)
Chapter 17:
Replacing your SQL DB with a NoSQL DB then implementing SQL in your ORM
General purpose databases are
pretty great
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909407/badge-deckchairs.png)
Chapter 18:
A type-checked transpilation step will surely speed things up
Type checking helps you write bigger applications
This is not the same as scaling.
Types are great
They're just not a scaling technique.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909392/badge-missing-the-point.png)
Chapter 19:
Fuck it, let's use a Bloom filter
Bloom filters: useful at Google scale
You're not at Google scale, and never will be.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Chapter 20:Renting a 32-core machine with 500GB of RAM
when your limit is disk I/O
Bigger boxes are not necessarily better
Chapter 21:
Writing a new language almost the same as your old language but faster
Guest chapter by Mark Zuckerberg
If you can afford this, go right ahead
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909383/badge-100.png)
Chapter 22:
Fuck it, let's use ✨machine learning✨
for everything
Nightmare cats for all!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909441/Screenshot_2017-06-11_19.11.07.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909442/Screenshot_2017-06-11_19.12.11.png)
Sprinkle ML
on your pitch deck!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909384/badge-novelty.png)
Bonus chapter:
Guessing
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909399/badge-so-close.png)
The way to scale any application is: carefully
npm has scaled
and so can you
![](https://s3.amazonaws.com/media-p.slid.es/uploads/136956/images/3909452/Screenshot_2017-06-14_22.47.07.png)
Thank you
Twitter: @seldo
npm swag? Find me in the hallway.
Solving Imaginary Scaling Issues At Scale
By seldo
Solving Imaginary Scaling Issues At Scale
- 7,627