SlideShare a Scribd company logo
Scaling Apache Storm 
P. Taylor Goetz, Hortonworks 
@ptgoetz
About Me 
Member of Technical Staff / Storm Tech Lead 
@ Hortonworks 
Apache Storm PMC Chair 
@ Apache
About Me 
Member of Technical Staff / Storm Tech Lead 
@ Hortonworks 
Apache Storm PMC Chair 
@ Apache 
Volunteer Firefighter since 2004
1M+ messages / sec. on a 10-15 
node cluster 
How do you get there?
How do you fight fire?
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014
Put the wet stuff on the red stuff. 
Water, and lots of it.
Scaling Apache Storm - Strata + Hadoop World 2014
When you're dealing with big fire, you 
need big water.
Static Water Sources 
Lakes 
Streams 
Reservoirs, Pools, Ponds
Scaling Apache Storm - Strata + Hadoop World 2014
Data Hydrant 
Active source 
Under pressure
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014
How does this relate to Storm?
Little’s Law 
L=λW 
The long-term average number of customers in a stable system L 
is equal to the long-term average effective arrival rate, λ, multiplied 
by the average time a customer spends in the system, W; or 
expressed algebraically: L = λW. 
http://en.wikipedia.org/wiki/Little's_law
Batch vs. Streaming
Batch Processing 
Operates on data at rest 
Velocity is a function of 
performance 
Poor performance costs you time
Stream Processing 
Data in motion 
At the mercy of your data source 
Velocity fluctuates over time 
Poor performance….
Poor performance bursts the pipes. 
Buffers fill up and eat memory 
Timeouts / Replays 
“Sink” systems overwhelmed
What can developers do?
Keep tuple processing code tight 
public class MyBolt extends BaseRichBolt { 
! 
public void prepare(Map stormConf, 
TopologyContext context, 
OutputCollector collector) { 
// initialize task 
} 
! 
public void execute(Tuple input) { 
// process input — QUICKLY! 
} 
! 
public void declareOutputFields(OutputFieldsDeclarer declarer) { 
// declare output 
} 
! 
} 
Worry about this!
Keep tuple processing code tight 
public class MyBolt extends BaseRichBolt { 
! 
public void prepare(Map stormConf, 
TopologyContext context, 
OutputCollector collector) { 
// initialize task 
} 
! 
public void execute(Tuple input) { 
// process input — QUICKLY! 
} 
! 
public void declareOutputFields(OutputFieldsDeclarer declarer) { 
// declare output 
} 
! 
} 
Not this.
Know your latencies 
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 
Read 
1 
MB 
sequentially 
from 
disk 
20,000,000 
ns 
20 
ms 
80x 
memory, 
20X 
SSD 
Send 
packet 
CA-­‐>Netherlands-­‐>CA 
150,000,000 
ns 
150 
ms 
https://gist.github.com/jboner/2841832
Use a Cache 
Guava is your friend.
Expose your knobs and gauges. 
DevOps will appreciate it.
Externalize Configuration 
Hard-coded values require 
recompilation/repackaging. 
conf.setNumWorkers(3); 
builder.setSpout("spout", new RandomSentenceSpout(), 5); 
builder.setBolt("split", new SplitSentence(), 8).shuffleGrouping("spout"); 
builder.setBolt("count", new WordCount(), 12).fieldsGrouping("split", new Fields("word")); 
Values from external config. 
No repackaging! 
conf.setNumWorkers(props.get(“num.workers")); 
builder.setSpout("spout", new RandomSentenceSpout(), props.get(“spout.paralellism”)); 
builder.setBolt("split", new SplitSentence(), props.get(“split.paralellism”)).shuffleGrouping("spout"); 
builder.setBolt("count", new WordCount(), props.get(“count.paralellism”)).fieldsGrouping("split", new Fields("word"));
What can DevOps do?
How big is your hose?
Text 
Find out!
Performance testing is essential! 
Text
How to deal with small pipes? 
(i.e. When your output is more like a garden hose.)
Parallelize 
Slow sinks
Parallelism == Manifold 
Take input from one big pipe and 
distribute it to many smaller pipes 
The bigger the size difference, the 
more parallelism you will need
Sizeup 
Initial assessment
Every fire is different.
Text
Every streaming use case is different.
Sizeup — Fire 
What are my water 
sources? What GPM 
can they support? 
How many lines (hoses) 
do I need? 
How much water will I 
need to flow to put this 
fire out?
Sizeup — Storm 
What are my input 
sources? 
At what rate do they 
deliver messages? 
What size are the 
messages? 
What's my slowest data 
sink?
There is no magic bullet.
But there are good starting points.
Numbers 
Where to start.
1 Worker / Machine / Topology 
Keep unnecessary network transfer to a minimum
1 Acker / Worker 
Default in Storm 0.9.x
1 Executor / CPU Core 
Optimize Thread/CPU usage
1 Executor / CPU Core 
(for CPU-bound use cases)
1 Executor / CPU Core 
Multiply by 10x-100x for I/O bound use cases
Example 
10 Worker Nodes 
16 Cores / Machine 
10 * 16 = 160 “Parallelism Units” available
Example 
10 Worker Nodes 
16 Cores / Machine 
10 * 16 = 160 “Parallelism Units” available 
! 
Subtract # Ackers: 160 - 10 = 150 Units.
Example 
10 Worker Nodes 
16 Cores / Machine 
(10 * 16) - 10 = 150 “Parallelism Units” available
Example 
10 Worker Nodes 
16 Cores / Machine 
(10 * 16) - 10 = 150 “Parallelism Units” available (* 10-100 if I/O bound) 
Distrubte this among tasks in topology. Higher for slow tasks, lower for fast tasks.
Example 
150 “Parallelism Units” available 
Emit Calculate Persist 
10 40 100
Watch Storm’s “capacity” metric 
This tells you how hard components are working. 
Adjust parallelism unit distribution accordingly.
This is just a starting point. 
Test, test, test. Measure, measure, measure.
Internal 
Messaging 
Handling backpressure.
Internal Messaging (Intra-worker)
Key Settings 
topology.max.spout.pending 
Spout/Bolt API: Controls how many tuples are in-flight (not ack’ed) 
Trident API: Controls how many batches are in flight (not committed)
Key Settings 
topology.max.spout.pending 
When reached, Storm will temporarily stop emitting data from Spout(s) 
WARNING: Default is “unset” (i.e. no limit)
Key Settings 
topology.max.spout.pending 
Spout/Bolt API: Start High (~1,000) 
Trident API: Start Low (~1-5)
Key Settings 
topology.message.timeout.secs 
Controls how long a tuple tree (Spout/Bolt API) or batch (Trident API) has to 
complete processing before Storm considers it timed out and fails it. 
Default value is 30 seconds.
Key Settings 
topology.message.timeout.secs 
Q: “Why am I getting tuple/batch failures for no apparent reason?” 
A: Timeouts due to a bottleneck. 
Solution: Look at the “Complete Latency” metric. Increase timeout and/or 
increase component parallelism to address the bottleneck.
Turn knobs slowly, one at a time.
Don't mess with settings you don't 
understand.
Storm ships with sane defaults 
Override only as necessary
Hardware 
Considerations
Nimbus 
Generally light load 
Can collocate Storm UI service 
m1.xlarge (or equivalent) should suffice 
Save the big metal for Supervisor/Worker machines…
Supervisor/Worker Nodes 
Where hardware choices have the most impact.
CPU Cores 
More is usually better 
The more you have the more 
threads you can support (i.e. 
parallelism) 
Storm potentially uses a lot of 
threads
Memory 
Highly use-case specific 
How many workers (JVMs) per 
node? 
Are you caching and/or holding 
in-memory state? 
Tests/metrics are your friends
Network 
Use bonded NICs if necessary 
Keep nodes “close”
Other performance considerations
Don’t “Pancake!” 
Separate concerns.
Don’t “Pancake!” 
Separate concerns. 
CPU Contention 
I/O Contention 
Disk Seeks (ZooKeeper)
Keep this guy happy. 
He has big boots and a shovel.
ZooKeeper Considerations 
Use dedicated machines, preferably 
bare-metal if an option 
Start with 3 node ensemble 
(can tolerate 1 node loss) 
I/O is ZooKeeper’s main bottleneck 
Dedicated disk for ZK storage 
SSDs greatly improve performance
Recap 
Know/track your latencies and code appropriately 
Externalize configuration 
Scaling is a factor of balancing the I/O and CPU requirements of your use 
case 
Dev + DevOps + Ops coordination and collaboration is essential
Thanks! 
P. Taylor Goetz, Hortonworks 
@ptgoetz

More Related Content

PDF
Fuzzy Matching on Apache Spark with Jennifer Shin
PDF
Top 5 Mistakes When Writing Spark Applications by Mark Grover and Ted Malaska
PPTX
How to understand and analyze Apache Hive query execution plan for performanc...
PDF
Fuzzy Matching to the Rescue
PDF
An Overview of Ambari
PDF
Parquet Hadoop Summit 2013
PDF
Cosco: An Efficient Facebook-Scale Shuffle Service
PDF
Operating PostgreSQL at Scale with Kubernetes
Fuzzy Matching on Apache Spark with Jennifer Shin
Top 5 Mistakes When Writing Spark Applications by Mark Grover and Ted Malaska
How to understand and analyze Apache Hive query execution plan for performanc...
Fuzzy Matching to the Rescue
An Overview of Ambari
Parquet Hadoop Summit 2013
Cosco: An Efficient Facebook-Scale Shuffle Service
Operating PostgreSQL at Scale with Kubernetes

What's hot (20)

PPTX
Apache hive introduction
PDF
Building a SIMD Supported Vectorized Native Engine for Spark SQL
PDF
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
DOCX
Notes of java first unit
PDF
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
PDF
RAPIDS – Open GPU-accelerated Data Science
ODP
Hbase trabalho final
PPTX
Apache Phoenix and Apache HBase: An Enterprise Grade Data Warehouse
PPTX
Hadoop HDFS Architeture and Design
PDF
Vsol hg325 dac product datasheet v1.01(1)
PDF
How Impala Works
PPTX
Apache HBase Performance Tuning
PPTX
Learn HTML Step By Step
PDF
Real-time Twitter Sentiment Analysis and Image Recognition with Apache NiFi
PDF
HBase Storage Internals
ODP
Apache hadoop hbase
PDF
Getting Started with HBase
PPTX
Integrating Apache NiFi and Apache Flink
PPTX
Apache Atlas: Why Big Data Management Requires Hierarchical Taxonomies
PPTX
Using Apache Hive with High Performance
Apache hive introduction
Building a SIMD Supported Vectorized Native Engine for Spark SQL
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Notes of java first unit
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
RAPIDS – Open GPU-accelerated Data Science
Hbase trabalho final
Apache Phoenix and Apache HBase: An Enterprise Grade Data Warehouse
Hadoop HDFS Architeture and Design
Vsol hg325 dac product datasheet v1.01(1)
How Impala Works
Apache HBase Performance Tuning
Learn HTML Step By Step
Real-time Twitter Sentiment Analysis and Image Recognition with Apache NiFi
HBase Storage Internals
Apache hadoop hbase
Getting Started with HBase
Integrating Apache NiFi and Apache Flink
Apache Atlas: Why Big Data Management Requires Hierarchical Taxonomies
Using Apache Hive with High Performance
Ad

Viewers also liked (7)

PDF
Storm: distributed and fault-tolerant realtime computation
PPTX
Resource Aware Scheduling in Apache Storm
PDF
Realtime Analytics with Storm and Hadoop
PDF
Hadoop Summit Europe 2014: Apache Storm Architecture
PPTX
Apache Storm 0.9 basic training - Verisign
PPTX
Yahoo compares Storm and Spark
PPTX
Kafka Tutorial Advanced Kafka Consumers
Storm: distributed and fault-tolerant realtime computation
Resource Aware Scheduling in Apache Storm
Realtime Analytics with Storm and Hadoop
Hadoop Summit Europe 2014: Apache Storm Architecture
Apache Storm 0.9 basic training - Verisign
Yahoo compares Storm and Spark
Kafka Tutorial Advanced Kafka Consumers
Ad

Similar to Scaling Apache Storm - Strata + Hadoop World 2014 (20)

PDF
The Future of Apache Storm
PDF
The Future of Apache Storm
PDF
Distributed Realtime Computation using Apache Storm
PPTX
Next Generation Execution Engine for Apache Storm
PPTX
The Future of Apache Storm
PPT
Real-Time Streaming with Apache Spark Streaming and Apache Storm
PPTX
storm-170531123446.dotx.pptx
PPTX
Future of Apache Storm
PDF
Mhug apache storm
PDF
Resource Scheduling using Apache Mesos in Cloud Native Environments
PPTX
Cleveland HUG - Storm
PPTX
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
PPTX
From Gust To Tempest: Scaling Storm
PPTX
Scaling Apache Storm (Hadoop Summit 2015)
PPTX
Storm – Streaming Data Analytics at Scale - StampedeCon 2014
PPTX
Introduction to Streaming Distributed Processing with Storm
PDF
Workers and Event processors that Scale
PDF
BWB Meetup: Storm - distributed realtime computation system
PPTX
Storm is coming
PPTX
Introduction to Storm
The Future of Apache Storm
The Future of Apache Storm
Distributed Realtime Computation using Apache Storm
Next Generation Execution Engine for Apache Storm
The Future of Apache Storm
Real-Time Streaming with Apache Spark Streaming and Apache Storm
storm-170531123446.dotx.pptx
Future of Apache Storm
Mhug apache storm
Resource Scheduling using Apache Mesos in Cloud Native Environments
Cleveland HUG - Storm
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
From Gust To Tempest: Scaling Storm
Scaling Apache Storm (Hadoop Summit 2015)
Storm – Streaming Data Analytics at Scale - StampedeCon 2014
Introduction to Streaming Distributed Processing with Storm
Workers and Event processors that Scale
BWB Meetup: Storm - distributed realtime computation system
Storm is coming
Introduction to Storm

More from P. Taylor Goetz (6)

PPTX
Flux: Apache Storm Frictionless Topology Configuration & Deployment
PPTX
From Device to Data Center to Insights: Architectural Considerations for the ...
PPTX
Past, Present, and Future of Apache Storm
PPTX
Large Scale Graph Analytics with JanusGraph
PDF
Apache storm vs. Spark Streaming
PPTX
Cassandra and Storm at Health Market Sceince
Flux: Apache Storm Frictionless Topology Configuration & Deployment
From Device to Data Center to Insights: Architectural Considerations for the ...
Past, Present, and Future of Apache Storm
Large Scale Graph Analytics with JanusGraph
Apache storm vs. Spark Streaming
Cassandra and Storm at Health Market Sceince

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation theory and applications.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
A Presentation on Artificial Intelligence
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
CIFDAQ's Market Insight: SEC Turns Pro Crypto
NewMind AI Monthly Chronicles - July 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation theory and applications.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Scaling Apache Storm - Strata + Hadoop World 2014

  • 1. Scaling Apache Storm P. Taylor Goetz, Hortonworks @ptgoetz
  • 2. About Me Member of Technical Staff / Storm Tech Lead @ Hortonworks Apache Storm PMC Chair @ Apache
  • 3. About Me Member of Technical Staff / Storm Tech Lead @ Hortonworks Apache Storm PMC Chair @ Apache Volunteer Firefighter since 2004
  • 4. 1M+ messages / sec. on a 10-15 node cluster How do you get there?
  • 5. How do you fight fire?
  • 8. Put the wet stuff on the red stuff. Water, and lots of it.
  • 10. When you're dealing with big fire, you need big water.
  • 11. Static Water Sources Lakes Streams Reservoirs, Pools, Ponds
  • 13. Data Hydrant Active source Under pressure
  • 17. How does this relate to Storm?
  • 18. Little’s Law L=λW The long-term average number of customers in a stable system L is equal to the long-term average effective arrival rate, λ, multiplied by the average time a customer spends in the system, W; or expressed algebraically: L = λW. http://en.wikipedia.org/wiki/Little's_law
  • 20. Batch Processing Operates on data at rest Velocity is a function of performance Poor performance costs you time
  • 21. Stream Processing Data in motion At the mercy of your data source Velocity fluctuates over time Poor performance….
  • 22. Poor performance bursts the pipes. Buffers fill up and eat memory Timeouts / Replays “Sink” systems overwhelmed
  • 24. Keep tuple processing code tight public class MyBolt extends BaseRichBolt { ! public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { // initialize task } ! public void execute(Tuple input) { // process input — QUICKLY! } ! public void declareOutputFields(OutputFieldsDeclarer declarer) { // declare output } ! } Worry about this!
  • 25. Keep tuple processing code tight public class MyBolt extends BaseRichBolt { ! public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { // initialize task } ! public void execute(Tuple input) { // process input — QUICKLY! } ! public void declareOutputFields(OutputFieldsDeclarer declarer) { // declare output } ! } Not this.
  • 26. Know your latencies 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 Read 1 MB sequentially from disk 20,000,000 ns 20 ms 80x memory, 20X SSD Send packet CA-­‐>Netherlands-­‐>CA 150,000,000 ns 150 ms https://gist.github.com/jboner/2841832
  • 27. Use a Cache Guava is your friend.
  • 28. Expose your knobs and gauges. DevOps will appreciate it.
  • 29. Externalize Configuration Hard-coded values require recompilation/repackaging. conf.setNumWorkers(3); builder.setSpout("spout", new RandomSentenceSpout(), 5); builder.setBolt("split", new SplitSentence(), 8).shuffleGrouping("spout"); builder.setBolt("count", new WordCount(), 12).fieldsGrouping("split", new Fields("word")); Values from external config. No repackaging! conf.setNumWorkers(props.get(“num.workers")); builder.setSpout("spout", new RandomSentenceSpout(), props.get(“spout.paralellism”)); builder.setBolt("split", new SplitSentence(), props.get(“split.paralellism”)).shuffleGrouping("spout"); builder.setBolt("count", new WordCount(), props.get(“count.paralellism”)).fieldsGrouping("split", new Fields("word"));
  • 31. How big is your hose?
  • 33. Performance testing is essential! Text
  • 34. How to deal with small pipes? (i.e. When your output is more like a garden hose.)
  • 36. Parallelism == Manifold Take input from one big pipe and distribute it to many smaller pipes The bigger the size difference, the more parallelism you will need
  • 38. Every fire is different.
  • 39. Text
  • 40. Every streaming use case is different.
  • 41. Sizeup — Fire What are my water sources? What GPM can they support? How many lines (hoses) do I need? How much water will I need to flow to put this fire out?
  • 42. Sizeup — Storm What are my input sources? At what rate do they deliver messages? What size are the messages? What's my slowest data sink?
  • 43. There is no magic bullet.
  • 44. But there are good starting points.
  • 46. 1 Worker / Machine / Topology Keep unnecessary network transfer to a minimum
  • 47. 1 Acker / Worker Default in Storm 0.9.x
  • 48. 1 Executor / CPU Core Optimize Thread/CPU usage
  • 49. 1 Executor / CPU Core (for CPU-bound use cases)
  • 50. 1 Executor / CPU Core Multiply by 10x-100x for I/O bound use cases
  • 51. Example 10 Worker Nodes 16 Cores / Machine 10 * 16 = 160 “Parallelism Units” available
  • 52. Example 10 Worker Nodes 16 Cores / Machine 10 * 16 = 160 “Parallelism Units” available ! Subtract # Ackers: 160 - 10 = 150 Units.
  • 53. Example 10 Worker Nodes 16 Cores / Machine (10 * 16) - 10 = 150 “Parallelism Units” available
  • 54. Example 10 Worker Nodes 16 Cores / Machine (10 * 16) - 10 = 150 “Parallelism Units” available (* 10-100 if I/O bound) Distrubte this among tasks in topology. Higher for slow tasks, lower for fast tasks.
  • 55. Example 150 “Parallelism Units” available Emit Calculate Persist 10 40 100
  • 56. Watch Storm’s “capacity” metric This tells you how hard components are working. Adjust parallelism unit distribution accordingly.
  • 57. This is just a starting point. Test, test, test. Measure, measure, measure.
  • 60. Key Settings topology.max.spout.pending Spout/Bolt API: Controls how many tuples are in-flight (not ack’ed) Trident API: Controls how many batches are in flight (not committed)
  • 61. Key Settings topology.max.spout.pending When reached, Storm will temporarily stop emitting data from Spout(s) WARNING: Default is “unset” (i.e. no limit)
  • 62. Key Settings topology.max.spout.pending Spout/Bolt API: Start High (~1,000) Trident API: Start Low (~1-5)
  • 63. Key Settings topology.message.timeout.secs Controls how long a tuple tree (Spout/Bolt API) or batch (Trident API) has to complete processing before Storm considers it timed out and fails it. Default value is 30 seconds.
  • 64. Key Settings topology.message.timeout.secs Q: “Why am I getting tuple/batch failures for no apparent reason?” A: Timeouts due to a bottleneck. Solution: Look at the “Complete Latency” metric. Increase timeout and/or increase component parallelism to address the bottleneck.
  • 65. Turn knobs slowly, one at a time.
  • 66. Don't mess with settings you don't understand.
  • 67. Storm ships with sane defaults Override only as necessary
  • 69. Nimbus Generally light load Can collocate Storm UI service m1.xlarge (or equivalent) should suffice Save the big metal for Supervisor/Worker machines…
  • 70. Supervisor/Worker Nodes Where hardware choices have the most impact.
  • 71. CPU Cores More is usually better The more you have the more threads you can support (i.e. parallelism) Storm potentially uses a lot of threads
  • 72. Memory Highly use-case specific How many workers (JVMs) per node? Are you caching and/or holding in-memory state? Tests/metrics are your friends
  • 73. Network Use bonded NICs if necessary Keep nodes “close”
  • 76. Don’t “Pancake!” Separate concerns. CPU Contention I/O Contention Disk Seeks (ZooKeeper)
  • 77. Keep this guy happy. He has big boots and a shovel.
  • 78. ZooKeeper Considerations Use dedicated machines, preferably bare-metal if an option Start with 3 node ensemble (can tolerate 1 node loss) I/O is ZooKeeper’s main bottleneck Dedicated disk for ZK storage SSDs greatly improve performance
  • 79. Recap Know/track your latencies and code appropriately Externalize configuration Scaling is a factor of balancing the I/O and CPU requirements of your use case Dev + DevOps + Ops coordination and collaboration is essential
  • 80. Thanks! P. Taylor Goetz, Hortonworks @ptgoetz