SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
The 5 Stages of
     Scale
   Christopher Smith
Who am I?
Two decades experience

Half of that in online advertising

Internet systems engineering

Scaling web serving, data collection
& analysis

Places big & small.
Scalability


scale: v.tr.
  1. To clear or strip of scale or scales.

  2. Weigh a specified weight.

  3. Climb up or over (something steep)
Your App                                    Your App




                                        Responsiveness
Throughput




             0   2      4       6   8                    0   2      4       6   8
                      Usage                                       Usage
Your App       Trend                            Your App       Trend




                                            Responsiveness
Throughput




             0     2        4   6       8                    0     2        4   6       8
                       Usage                                           Usage
Your App                                           Your App       Trend
             Undeniable Extrapolation




                                           Responsiveness
Throughput




             0       500000      1000000                    0         500000      1000000
                      Usage                                           Usage
Your App                                           Your App       Trend
             Undeniable Extrapolation



                              Scalability:



                                           Responsiveness
Throughput




                 Saving This Guy’s Job

             0       500000      1000000                    0         500000      1000000
                      Usage                                           Usage
Scalability
       Envelopes

There is always a “next” bottleneck.

In case of scalability problem...

6 envelopes
Envelope 0

Session partitioning

Commodity: load balancer, multi-*

Linear scale for CPU

Limit: C10K?
Envelope 1
Read Caching

  Reverse-proxy

  memcached

  CDN

log(n) scale: thank you Zipf

Limit: ~200 w/sec
Envelope 2
Get a real persistence framework

  Data structures FTW!

  DB: concurrent read/write

  MOM: queuing/event IO/TP monitors

  Cheat on ACID (particularly C & D)

log(n) scale?

1000-10000 w/sec
Tipping over
Scaling Catamaran’s

RAM caching I/O

RAID

Threads (sometimes)

Packet loss (UR DUING IT WRONG)

SSD’s?
Jeff Dean’s Numbers
Latency Comparison Numbers

--------------------------

L1 cache reference                            0.5 ns

Branch mispredict                             5   ns

L2 cache reference                            7   ns               14x L1 cache

Mutex lock/unlock                            25   ns

Main memory reference                       100   ns               20x L2 cache, 200x L1 cache

Compress 1K bytes with Zippy              3,000   ns

Send 1K bytes over 1 Gbps network        10,000   ns    0.01 ms

Read 4K randomly from SSD*              150,000   ns    0.15 ms

Read 1 MB sequentially from memory      250,000   ns    0.25 ms

Round trip within same datacenter       500,000   ns    0.5   ms

Read 1 MB sequentially from SSD*      1,000,000   ns    1     ms   4X memory

Disk seek                            10,000,000   ns   10     ms   20x datacenter roundtrip
Problem: IO latency
Throughput: 2x every 18 months

Latency:
  CPU: <2x every 18 months

  LAN network: 2x every 2-3 years

  Memory: 2x every 3-5 years

  Disk: 2x every decade? (SSD?)

  WAN Network: 1x every...
Problem IO Latency
Traditional indexes on the wrong side

  Turns a scan in to a seek

  Index lookup: scan 0.1% of records + 1
  random seek

  Scan: scan 100% of records, 0 random seek

  Seek is 10ms & Scan is 100Hz -> 10x win

  Seek is 1ms & Scan is 1GHz -> 1000x loss
Envelope 3

Real partitioning of IO

Move code, not data

Commodities: Map/Reduce (Hadoop), DHT
(Cassandra, HBase, Riak)

CAP Theory limiting sync’ing
Envelope 4

Route new data through data
partitions

  Using MOM/EventIO “the right way”

  ESP/CEP: Eigen, Storm, Esper,
  StreamBase, 0mq, etc.
Envelope 5

Cheat more on reliability.
 UDP w/o reliability > TCP

 Measure loss vs. prevent loss

 Horseshoes, hand grenades,
 features...?
Integrated Systems
Combined IO management solutions:

  real-time memory key/value lookup

  LSM + bitmap indexes + etc.

  eventual consistency

  mobile code for batch processing

Cassandra, HBase, etc.
Efficient Logging

Events in efficient machine parseable
form: (protobuf, thrift, etc.)

Event source writes only to NIC

UDP Multicast

Redundant listeners
message LogEvent {

    required uint64 pid = 1;

    optional uint64 tid = 2;

    optional uint64 sid = 4;

    required uint64 sequence = 5;

    required uint64 timestamp = 6;

    enum Level { PANIC = 0, ERROR = 1..}

    required Level level = 7;

    required bytes payload = 8;

}
Announcements

Dedicated channel.

Payload: channel IP, channel port,
last seq, pid, tid, sid + stats

All announcers listen and self-
throttle.

Directory service accumulates
Consolidation


Redundant journalers (RAID)

ESP: detect loss in real time window

If necessary, Map/Reduce processing
to try to resolve partial loss.
Efficiency
Hundreds of nodes

>50MB/sec

>50,000 pps

3-4 “journalers” resolving data

>5TB reconciled data a day

<0.1% data loss
Envelope 6



Take out 6 envelopes...

Weitere ähnliche Inhalte

Ähnlich wie The 5 Stages of Scale: How to Optimize Your App for Growth

Internet Scale Architecture
Internet Scale ArchitectureInternet Scale Architecture
Internet Scale ArchitectureRightScale
 
Parallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency ClustersParallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency ClustersVittorio Giovara
 
Cassandra at eBay - Cassandra Summit 2012
Cassandra at eBay - Cassandra Summit 2012Cassandra at eBay - Cassandra Summit 2012
Cassandra at eBay - Cassandra Summit 2012Jay Patel
 
SnappyData @ Seattle Spark Meetup
SnappyData @ Seattle Spark MeetupSnappyData @ Seattle Spark Meetup
SnappyData @ Seattle Spark MeetupSnappyData
 
Tidal scale short_story_v2
Tidal scale short_story_v2Tidal scale short_story_v2
Tidal scale short_story_v2Chuck Piercey
 
Modernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabricModernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabricSoftware Guru
 
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance BarriersCeph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance BarriersCeph Community
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented DesignRodrigo Campos
 
Day 4 - Big Data on AWS - RedShift, EMR & the Internet of Things
Day 4 - Big Data on AWS - RedShift, EMR & the Internet of ThingsDay 4 - Big Data on AWS - RedShift, EMR & the Internet of Things
Day 4 - Big Data on AWS - RedShift, EMR & the Internet of ThingsAmazon Web Services
 
Advanced Open IoT Platform for Prevention and Early Detection of Forest Fires
Advanced Open IoT Platform for Prevention and Early Detection of Forest FiresAdvanced Open IoT Platform for Prevention and Early Detection of Forest Fires
Advanced Open IoT Platform for Prevention and Early Detection of Forest FiresIvo Andreev
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017Rick Hightower
 
Pandora FMS - Technical presentation
Pandora FMS - Technical presentationPandora FMS - Technical presentation
Pandora FMS - Technical presentationSancho Lerena
 
Real-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataReal-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataRomeo Kienzler
 
A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...
A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...
A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...Gabriele Di Bernardo
 
Pets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud StoryPets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud StoryRandy Bias
 
Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Gridsgojkoadzic
 
Launching Your First Big Data Project on AWS
Launching Your First Big Data Project on AWSLaunching Your First Big Data Project on AWS
Launching Your First Big Data Project on AWSAmazon Web Services
 
Mastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesMastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesJosh Evans
 
How to Make Hadoop Easy, Dependable and Fast
How to Make Hadoop Easy, Dependable and FastHow to Make Hadoop Easy, Dependable and Fast
How to Make Hadoop Easy, Dependable and FastMapR Technologies
 
Starfish: A Self-tuning System for Big Data Analytics
Starfish: A Self-tuning System for Big Data AnalyticsStarfish: A Self-tuning System for Big Data Analytics
Starfish: A Self-tuning System for Big Data AnalyticsGrant Ingersoll
 

Ähnlich wie The 5 Stages of Scale: How to Optimize Your App for Growth (20)

Internet Scale Architecture
Internet Scale ArchitectureInternet Scale Architecture
Internet Scale Architecture
 
Parallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency ClustersParallel and Distributed Computing on Low Latency Clusters
Parallel and Distributed Computing on Low Latency Clusters
 
Cassandra at eBay - Cassandra Summit 2012
Cassandra at eBay - Cassandra Summit 2012Cassandra at eBay - Cassandra Summit 2012
Cassandra at eBay - Cassandra Summit 2012
 
SnappyData @ Seattle Spark Meetup
SnappyData @ Seattle Spark MeetupSnappyData @ Seattle Spark Meetup
SnappyData @ Seattle Spark Meetup
 
Tidal scale short_story_v2
Tidal scale short_story_v2Tidal scale short_story_v2
Tidal scale short_story_v2
 
Modernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabricModernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabric
 
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance BarriersCeph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
Ceph Day Berlin: Ceph on All Flash Storage - Breaking Performance Barriers
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented Design
 
Day 4 - Big Data on AWS - RedShift, EMR & the Internet of Things
Day 4 - Big Data on AWS - RedShift, EMR & the Internet of ThingsDay 4 - Big Data on AWS - RedShift, EMR & the Internet of Things
Day 4 - Big Data on AWS - RedShift, EMR & the Internet of Things
 
Advanced Open IoT Platform for Prevention and Early Detection of Forest Fires
Advanced Open IoT Platform for Prevention and Early Detection of Forest FiresAdvanced Open IoT Platform for Prevention and Early Detection of Forest Fires
Advanced Open IoT Platform for Prevention and Early Detection of Forest Fires
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017
 
Pandora FMS - Technical presentation
Pandora FMS - Technical presentationPandora FMS - Technical presentation
Pandora FMS - Technical presentation
 
Real-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataReal-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor Data
 
A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...
A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...
A Scalable and Hybrid Cloud Framework for Evaluating Streams of Sensor Data i...
 
Pets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud StoryPets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud Story
 
Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Grids
 
Launching Your First Big Data Project on AWS
Launching Your First Big Data Project on AWSLaunching Your First Big Data Project on AWS
Launching Your First Big Data Project on AWS
 
Mastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesMastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to Microservices
 
How to Make Hadoop Easy, Dependable and Fast
How to Make Hadoop Easy, Dependable and FastHow to Make Hadoop Easy, Dependable and Fast
How to Make Hadoop Easy, Dependable and Fast
 
Starfish: A Self-tuning System for Big Data Analytics
Starfish: A Self-tuning System for Big Data AnalyticsStarfish: A Self-tuning System for Big Data Analytics
Starfish: A Self-tuning System for Big Data Analytics
 

Kürzlich hochgeladen

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

The 5 Stages of Scale: How to Optimize Your App for Growth

  • 1. The 5 Stages of Scale Christopher Smith
  • 2. Who am I? Two decades experience Half of that in online advertising Internet systems engineering Scaling web serving, data collection & analysis Places big & small.
  • 3. Scalability scale: v.tr. 1. To clear or strip of scale or scales. 2. Weigh a specified weight. 3. Climb up or over (something steep)
  • 4. Your App Your App Responsiveness Throughput 0 2 4 6 8 0 2 4 6 8 Usage Usage
  • 5. Your App Trend Your App Trend Responsiveness Throughput 0 2 4 6 8 0 2 4 6 8 Usage Usage
  • 6. Your App Your App Trend Undeniable Extrapolation Responsiveness Throughput 0 500000 1000000 0 500000 1000000 Usage Usage
  • 7. Your App Your App Trend Undeniable Extrapolation Scalability: Responsiveness Throughput Saving This Guy’s Job 0 500000 1000000 0 500000 1000000 Usage Usage
  • 8. Scalability Envelopes There is always a “next” bottleneck. In case of scalability problem... 6 envelopes
  • 9. Envelope 0 Session partitioning Commodity: load balancer, multi-* Linear scale for CPU Limit: C10K?
  • 10. Envelope 1 Read Caching Reverse-proxy memcached CDN log(n) scale: thank you Zipf Limit: ~200 w/sec
  • 11. Envelope 2 Get a real persistence framework Data structures FTW! DB: concurrent read/write MOM: queuing/event IO/TP monitors Cheat on ACID (particularly C & D) log(n) scale? 1000-10000 w/sec
  • 13. Scaling Catamaran’s RAM caching I/O RAID Threads (sometimes) Packet loss (UR DUING IT WRONG) SSD’s?
  • 14. Jeff Dean’s Numbers Latency Comparison Numbers -------------------------- L1 cache reference 0.5 ns Branch mispredict 5 ns L2 cache reference 7 ns 14x L1 cache Mutex lock/unlock 25 ns Main memory reference 100 ns 20x L2 cache, 200x L1 cache Compress 1K bytes with Zippy 3,000 ns Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms Read 4K randomly from SSD* 150,000 ns 0.15 ms Read 1 MB sequentially from memory 250,000 ns 0.25 ms Round trip within same datacenter 500,000 ns 0.5 ms Read 1 MB sequentially from SSD* 1,000,000 ns 1 ms 4X memory Disk seek 10,000,000 ns 10 ms 20x datacenter roundtrip
  • 15. Problem: IO latency Throughput: 2x every 18 months Latency: CPU: <2x every 18 months LAN network: 2x every 2-3 years Memory: 2x every 3-5 years Disk: 2x every decade? (SSD?) WAN Network: 1x every...
  • 16. Problem IO Latency Traditional indexes on the wrong side Turns a scan in to a seek Index lookup: scan 0.1% of records + 1 random seek Scan: scan 100% of records, 0 random seek Seek is 10ms & Scan is 100Hz -> 10x win Seek is 1ms & Scan is 1GHz -> 1000x loss
  • 17. Envelope 3 Real partitioning of IO Move code, not data Commodities: Map/Reduce (Hadoop), DHT (Cassandra, HBase, Riak) CAP Theory limiting sync’ing
  • 18. Envelope 4 Route new data through data partitions Using MOM/EventIO “the right way” ESP/CEP: Eigen, Storm, Esper, StreamBase, 0mq, etc.
  • 19. Envelope 5 Cheat more on reliability. UDP w/o reliability > TCP Measure loss vs. prevent loss Horseshoes, hand grenades, features...?
  • 20. Integrated Systems Combined IO management solutions: real-time memory key/value lookup LSM + bitmap indexes + etc. eventual consistency mobile code for batch processing Cassandra, HBase, etc.
  • 21. Efficient Logging Events in efficient machine parseable form: (protobuf, thrift, etc.) Event source writes only to NIC UDP Multicast Redundant listeners
  • 22. message LogEvent { required uint64 pid = 1; optional uint64 tid = 2; optional uint64 sid = 4; required uint64 sequence = 5; required uint64 timestamp = 6; enum Level { PANIC = 0, ERROR = 1..} required Level level = 7; required bytes payload = 8; }
  • 23. Announcements Dedicated channel. Payload: channel IP, channel port, last seq, pid, tid, sid + stats All announcers listen and self- throttle. Directory service accumulates
  • 24. Consolidation Redundant journalers (RAID) ESP: detect loss in real time window If necessary, Map/Reduce processing to try to resolve partial loss.
  • 25. Efficiency Hundreds of nodes >50MB/sec >50,000 pps 3-4 “journalers” resolving data >5TB reconciled data a day <0.1% data loss
  • 26. Envelope 6 Take out 6 envelopes...