Slide 1

Slide 1 text

Scaling CANDDi oli wood @coldclimate

Slide 2

Slide 2 text

history

Slide 3

Slide 3 text

measure things that matter

Slide 4

Slide 4 text

back of a fag packet if good enough

Slide 5

Slide 5 text

have somewhere to test which is not live

Slide 6

Slide 6 text

use realistic data

Slide 7

Slide 7 text

ab/siege + ec2 instances

Slide 8

Slide 8 text

there are no silver bullets

Slide 9

Slide 9 text

aim for a silver shotgun cartridge

Slide 10

Slide 10 text

define the scenarios

Slide 11

Slide 11 text

build a pipeline view

Slide 12

Slide 12 text

identify symptoms but solve problems

Slide 13

Slide 13 text

symptoms are what you can see

Slide 14

Slide 14 text

problems are what you can solve

Slide 15

Slide 15 text

bad new: the problem is your code

Slide 16

Slide 16 text

good news: thus you can fix it

Slide 17

Slide 17 text

do less big things less often

Slide 18

Slide 18 text

do frequent things much faster

Slide 19

Slide 19 text

avoid waiting

Slide 20

Slide 20 text

pull less data

Slide 21

Slide 21 text

cache the painful things

Slide 22

Slide 22 text

cache: in memory

Slide 23

Slide 23 text

cache: redis/memcache

Slide 24

Slide 24 text

cache: url/browser cache

Slide 25

Slide 25 text

hunt collisions

Slide 26

Slide 26 text

use the tools

Slide 27

Slide 27 text

iostat

Slide 28

Slide 28 text

sar -P

Slide 29

Slide 29 text

strace -p

Slide 30

Slide 30 text

iftop

Slide 31

Slide 31 text

xdebug + webgrind

Slide 32

Slide 32 text

statsd

Slide 33

Slide 33 text

mongotop

Slide 34

Slide 34 text

mongosniff

Slide 35

Slide 35 text

tail -100000 mongodb. log | awk -F' ' '{print $NF}' | grep ms$ | sed 's/ms//g' |sort -n | tail -20 | xargs -I {} grep {} ms$ mongodb.log

Slide 36

Slide 36 text

and the big gestures

Slide 37

Slide 37 text

nginx

Slide 38

Slide 38 text

nodejs

Slide 39

Slide 39 text

redis

Slide 40

Slide 40 text

aim: loosely coupled components which are horizontally scalable both on box and by box

Slide 41

Slide 41 text

BULLSHIT

Slide 42

Slide 42 text

aim: fast enough for medium term business needs

Slide 43

Slide 43 text

aim: not to waste time in a geek circle jerk

Slide 44

Slide 44 text

result: 10x the throughput

Slide 45

Slide 45 text

result: 2000 non- trivial inbound events a second

Slide 46

Slide 46 text

good luck