Slide 1

Slide 1 text

Necessary Performance Measures: at Scale Brought to you by @rockbot

Slide 2

Slide 2 text

Package Management for Node.js • The Open Source Dream ! • ~70k packages • up to 10 million downloads/ day

Slide 3

Slide 3 text

221,845,731) !10,000!! !20,000!! !30,000!! !40,000!! !50,000!! !60,000!! !70,000!! !80,000!! !90,000!! !-!!!! !10,000,000!! !20,000,000!! !30,000,000!! !40,000,000!! !50,000,000!! !60,000,000!! !70,000,000!! !80,000,000!! !90,000,000!! !100,000,000!! !110,000,000!! !120,000,000!! !130,000,000!! !140,000,000!! !150,000,000!! !160,000,000!! !170,000,000!! !180,000,000!! !190,000,000!! !200,000,000!! !210,000,000!! !220,000,000!! !230,000,000!! !240,000,000!! 8/29/12! 12/7/12! 3/17/13! 6/25/13! 10/3/13! 1/11/14! 4/21/14! Downloads)of)npm)packages)in)previous)month)) &)Total)number)of)npm)Packages)of)node.js)code) !!!Downloads!of!npm!packages!in!previous!month! !!!Total!Number!of!npm!Packages!

Slide 4

Slide 4 text

Performance = Perception • Best request vs worst request • Focus on the few, super-slow instances: improve performance like whoa ! • Caching vs Distribution

Slide 5

Slide 5 text

Caching

Slide 6

Slide 6 text

Data Layer Query Caching Database-level performance enhancements ! innoDB buffer pool, CouchDB’s ACID architecture

Slide 7

Slide 7 text

Query Layer Save CPU Preprocessed/aggregated data; scheduled handling of data ! CouchDB views, Download Counts

Slide 8

Slide 8 text

App Layer Per-User Data that doesn’t change per user ! Storing user session data in Redis

Slide 9

Slide 9 text

Edge Server Layer Centralized/Global CDN, static assets ! Fastly

Slide 10

Slide 10 text

Client Layer Distributed HTTP headers, local storage, etc. ! Browser caching

Slide 11

Slide 11 text

Distribution

Slide 12

Slide 12 text

Split Load More boxes, more specialized boxes read-only, write-only ! One process per box Redis, CouchDB, ElasticSearch

Slide 13

Slide 13 text

Add Resiliency Multi-cloud, multi-zone East/West, multiple datacenters ! Fallback to least effort/ most common usage i.e. read-only

Slide 14

Slide 14 text

Boost with Third-Party Services Global content distribution network CDN

Slide 15

Slide 15 text

The End?

Slide 16

Slide 16 text

Thank You! ! Raquel Vélez @rockbot raquel@ js.com