Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

WEBPACK Scaling To Thousands of CONCURRENT BUILDS

Slide 3

Slide 3 text

WHY, HELLO THERE CHARLIE HERE

Slide 4

Slide 4 text

Who am I? Just

Slide 5

Slide 5 text

SENIOR DIR., UX PLATFORM @ GoDaddy

Slide 6

Slide 6 text

SENIOR DIR., UX PLATFORM @ GoDaddy BOARD MEMBER, NODE.JS FOUNDATION FORMERLY FOUNDER at NODEJITSU @INDEXZERO GITHUB TWITTER SO WHAT’S ALL THIS THEN?

Slide 7

Slide 7 text

What am I going to talk about? 5 1 Define the problem 2 Webpack it up, webpack it in 3 Initial solutions & naive approaches 4 DNS & HTTP Starvation 5 Putting it all together

Slide 8

Slide 8 text

LET’S DEFINE THE PROBLEM ITSELF

Slide 9

Slide 9 text

WEBPACK service as a

Slide 10

Slide 10 text

LET’S TALK webpack about

Slide 11

Slide 11 text

YOUR CODE

Slide 12

Slide 12 text

YOUR CODE “WEBPACK”

Slide 13

Slide 13 text

BUNDLE BUNDLE BUNDLE BUNDLE

Slide 14

Slide 14 text

BUNDLE BUNDLE BUNDLE BUNDLE there is more Of course under the covers

Slide 15

Slide 15 text

F I L E S TO DISK written

Slide 16

Slide 16 text

CPU BUILD TIME and lots of

Slide 17

Slide 17 text

PLACEHOLDER

Slide 18

Slide 18 text

PLACEHOLDER MINIFICATION

Slide 19

Slide 19 text

Copyright© 2017 Godaddy Inc. All Rights Reserved.

Slide 20

Slide 20 text

Copyright© 2017 Godaddy Inc. All Rights Reserved. CONFIG CONFIG lots of

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

WANT THE DEVELOPERS THE HOMER CAR

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

HELL

Slide 25

Slide 25 text

HELL webpack.config.js is other people’s

Slide 26

Slide 26 text

LET’S GET BACK TO THE PROBLEM ITSELF

Slide 27

Slide 27 text

WEBPACK service as a

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

It must be very reproducible

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

npm install Store output as a tarball

Slide 32

Slide 32 text

Your code

Slide 33

Slide 33 text

Your code npm install

Slide 34

Slide 34 text

Your code npm install store tarball

Slide 35

Slide 35 text

Your code npm install fetch tarbll store tarball

Slide 36

Slide 36 text

Your code webpack npm install fetch tarbll store tarball

Slide 37

Slide 37 text

Your code webpack npm install fetch tarbll store tarball store files

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

npm run build But what output should we store?

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

THE FIRST OF MANY SMALL QUESTIONS

Slide 42

Slide 42 text

NPM PUBLISH PAYLOAD npm install registry-mock -g ./registry-echo PROTIP! LEARN HOW THIS WORKS

Slide 43

Slide 43 text

a naive solution consider

Slide 44

Slide 44 text

Your computer

Slide 45

Slide 45 text

Your computer npm install requests

Slide 46

Slide 46 text

Your computer store tarball npm install requests

Slide 47

Slide 47 text

Your computer store tarball npm install requests webpack requests

Slide 48

Slide 48 text

Your computer store tarball store files npm install requests webpack requests

Slide 49

Slide 49 text

it was that
 simple if only

Slide 50

Slide 50 text

Your computer

Slide 51

Slide 51 text

Your computer npm install requests

Slide 52

Slide 52 text

Your computer store tarball npm install requests

Slide 53

Slide 53 text

Your computer store tarball npm install requests webpack requests

Slide 54

Slide 54 text

Your computer store tarball store files npm install requests webpack requests

Slide 55

Slide 55 text

Your computer store tarball store files npm install requests webpack requests DNS Caching

Slide 56

Slide 56 text

CONSIDER scale it at

Slide 57

Slide 57 text

Everyone’s computer

Slide 58

Slide 58 text

Everyone’s computer npm install requests webpack requests

Slide 59

Slide 59 text

from a pool of servers Everyone’s computer npm install requests webpack requests

Slide 60

Slide 60 text

from a pool of servers Everyone’s computer npm install requests webpack requests DNS Caching overloads one machine

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

STARVATION

Slide 63

Slide 63 text

about queues? what

Slide 64

Slide 64 text

PLACEHOLDER durability

Slide 65

Slide 65 text

PLACEHOLDER durability DURABILITY? PERSISTENCE?

Slide 66

Slide 66 text

PLACEHOLDER durability IN ORDER? OUT OF ORDER? DURABILITY? PERSISTENCE? DELIVERY GUARANTEES?

Slide 67

Slide 67 text

characteristics the

Slide 68

Slide 68 text

characteristics the of build systems

Slide 69

Slide 69 text

IDEMPOTENT

Slide 70

Slide 70 text

IDEMPOTENT ORDER DOES NOT MATTER

Slide 71

Slide 71 text

IDEMPOTENT ORDER DOES NOT MATTER EVENTUALLY CONSISTENT

Slide 72

Slide 72 text

IDEMPOTENT ORDER DOES NOT MATTER EVENTUALLY CONSISTENT NSQ MEETS ALL THESE

Slide 73

Slide 73 text

PUTTING together it all

Slide 74

Slide 74 text

Warehouse.ai lessons from PROD

Slide 75

Slide 75 text

carpenterd carpenterd-worker and

Slide 76

Slide 76 text

Your computer npm publish

Slide 77

Slide 77 text

Your computer npm publish Warehouse.ai

Slide 78

Slide 78 text

Your computer npm publish Warehouse.ai npm install requests carpenterd npm publish completes to any registry

Slide 79

Slide 79 text

carpenterd npm install

Slide 80

Slide 80 text

carpenterd npm install store tarball webpack requests

Slide 81

Slide 81 text

carpenterd npm install store tarball webpack requests webpack executes

Slide 82

Slide 82 text

carpenterd npm install store tarball webpack requests store files webpack executes

Slide 83

Slide 83 text

carpenterd npm install store tarball webpack requests store files webpack executes

Slide 84

Slide 84 text

carpenterd npm install store tarball webpack requests store files webpack executes P U L L PUSH don’t

Slide 85

Slide 85 text

FUTURES

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

WHAT IS SCALE?

Slide 88

Slide 88 text

spikes within Handling system workload

Slide 89

Slide 89 text

...WRAPPING UP...

Slide 90

Slide 90 text

...WRAPPING UP... GITHUB.COM/GODADDY/WAREHOUSE.AI GITHUB.COM/GODADDY/CARPENTERD GITHUB.COM/WAREHOUSEAI SPECIAL THANKS TO JARRETT CRUGER GEOFF WALL, MICHAEL LUTHER, AND ALL CONTRIBUTORS!

Slide 91

Slide 91 text

MAY THE SOURCE BE WITH YOU ICONS CREATED BY DINOSOFT LABS FROM THE NOUN PROJECT