SlideShare a Scribd company logo
Wednesday, November 20, 13
Heavy Lifting

ZUHAIB SIDDIQUE

Wednesday, November 20, 13

•

@ZUHAIB

•

ENGINEER
Wednesday, November 20, 13
1. Persistent chat rooms

Wednesday, November 20, 13
2. File sharing & Chat history

Wednesday, November 20, 13
3. @mentions + notifications

Wednesday, November 20, 13
4. Integrations and API

Wednesday, November 20, 13
5. Runs on everything

Wednesday, November 20, 13
5. Runs on everything

Wednesday, November 20, 13
5. Runs on everything

Wednesday, November 20, 13
Group chat and IM
for teams.

Wednesday, November 20, 13
1,000,000,000
1,200,000,000
messages sent
Wednesday, November 20, 13
What is a HipChat Message?
{

}
Wednesday, November 20, 13

"id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"from": {
"nick": "Zuhaib Siddique",
"group_id": 1,
"user_id": 1
},
"room": {
"group_id": 1,
"name": "testing",
"id": 1
},
"stanza_type": "muc_message",
"date": "2013-11-14T23:20:13Z 424967",
"stanza_data": {
"body": "ElasticSearch FTW"
}
In the beginning there was …

Wednesday, November 20, 13
Then we added...

https://github.com/rnewson/couchdb-lucene
Wednesday, November 20, 13
CouchDB + CouchDB-Lucene
•Started to tip over at
200M Docs

•m2.4xlarge

Wednesday, November 20, 13
CouchDB + CouchDB-Lucene

m2.4xlarge

m2.4xlarge

Worked well for the first 500M
Wednesday, November 20, 13
m2.4xlarge
Wednesday, November 20, 13

hs1.8xlarge
But it still wasn’t big enough.

Wednesday, November 20, 13
Dont F*ck the Customer

Wednesday, November 20, 13
First Attempt at Scaling

Wednesday, November 20, 13
Wednesday, November 20, 13
Why ElasticSearch for HipChat

Wednesday, November 20, 13
Why ElasticSearch for HipChat
{
"query_string" : {
"default_field" : "content",
"query" : "this AND that OR thus"
}
}

Wednesday, November 20, 13
Why ElasticSearch for HipChat

Wednesday, November 20, 13
Search Error Rate

Wednesday, November 20, 13
Wednesday, November 20, 13
Don’t Forget about CouchDB

AWS Max
EBS size
Wednesday, November 20, 13
Stop the CouchDB bleeding

Wednesday, November 20, 13
CouchDB end of the road

Wednesday, November 20, 13
Wednesday, November 20, 13
(allthethings) ElasticSearch
ElasticSearch
{
"_index": "muc-2013.11",
"_type": "document",
"_id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"_version": 1,
"exists": true,
"_source": {
"from": {
"nick": "Zuhaib Siddique",
"group_id": 1,
"user_id": 1
},
"room": {
"group_id": 1,
"name": "testing",
"id": 1
},
"stanza_type": "muc_message",
"date": "2013-11-14T23:20:13Z 424967",
"_id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"stanza_data": {
"body": "ElasticSearch FTW"
}
}
}
Wednesday, November 20, 13

CouchDB
{
"id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"from": {
"nick": "Zuhaib Siddique",
"group_id": 1,
"user_id": 1
},
"room": {
"group_id": 1,
"name": "testing",
"id": 1
},
"stanza_type": "muc_message",
"date": "2013-11-14T23:20:13Z 424967",
"stanza_data": {
"body": "ElasticSearch FTW"
}
}
(allthethings) ElasticSearch
ElasticSearch
{
"_index": "muc-2013.11",
"_type": "document",
"_id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"_version": 1,
"exists": true,
"_source": {
"from": {
"nick": "Zuhaib Siddique",
"group_id": 1,
"user_id": 1
},
"room": {
"group_id": 1,
"name": "testing",
"id": 1
},
"stanza_type": "muc_message",
"date": "2013-11-14T23:20:13Z 424967",
"_id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"stanza_data": {
"body": "ElasticSearch FTW"
}
}
}
Wednesday, November 20, 13

CouchDB
{
"id": "b0952da8-faa1-48f7-b1df-a8b2fb24bdfe",
"from": {
"nick": "Zuhaib Siddique",
"group_id": 1,
"user_id": 1
},
"room": {
"group_id": 1,
"name": "testing",
"id": 1
},
"stanza_type": "muc_message",
"date": "2013-11-14T23:20:13Z 424967",
"stanza_data": {
"body": "ElasticSearch FTW"
}
}
CouchDB vs ElasticSearch
CouchDB Spike
to 800ms!

Avg 100ms with ES

Wednesday, November 20, 13
Running ElasticSearch

HipChat Customer

master
Wednesday, November 20, 13

clients

Thanks Philip O’Toole - Loggly
$ fab create_esindex:hostname=esindex-d4

Wednesday, November 20, 13
Behind the Scenes
• Spin up EC2 Instance
• Install Oracle Java 7
• Create Provision IOPs EBS
• Install and configure ElasticSearch
• ???
• Profit!

Wednesday, November 20, 13
# Elasticsearch
nodes = partial_search(:node, "role:elasticsearch_server AND
chef_environment:#{node.chef_environment}",
:keys => {
'hostname' => [ 'hostname' ]
})
if nodes.empty?
Chef::Log.error "site.json - No Elasticsearch servers found"
else
es_nodes = nodes.map {|n|
{
'host' => n['hostname'],
'port' => 9200
}
}
data["elasticsearch"] = {
"connections" => es_nodes.sort_by {|n| n['host'] }
}
end
Wednesday, November 20, 13
site.json
"elasticsearch": {
"connections": [
{
“host": "esindex-c1",
"port": 9200
},
...
{
"host": "esindex-e3",
"port": 9200
}
]
}
Wednesday, November 20, 13
You

Wednesday, November 20, 13
Running Elasticsearch

Wednesday, November 20, 13
Running ElasticSearch
Single Node OOM!

Wednesday, November 20, 13
Monitor, Monitor, Monitor!

Wednesday, November 20, 13
Backup

Wednesday, November 20, 13
100,000,000,000?
To infinity and beyond!

Wednesday, November 20, 13
Questions?

Wednesday, November 20, 13

More Related Content

PPTX
Back to Basics Webinar 2: Your First MongoDB Application
PPTX
Back to Basics Webinar 3 - Thinking in Documents
PPTX
Back to Basics Webinar 1 - Introduction to NoSQL
PDF
MongoDB Europe 2016 - Debugging MongoDB Performance
PDF
JSON Web Tokens (JWT)
PDF
Couchdb w Ruby'm
PDF
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
PDF
NOSQL: il rinascimento dei database?
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 1 - Introduction to NoSQL
MongoDB Europe 2016 - Debugging MongoDB Performance
JSON Web Tokens (JWT)
Couchdb w Ruby'm
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
NOSQL: il rinascimento dei database?

What's hot (20)

PPT
Building Your First App with MongoDB
PDF
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
PDF
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
PDF
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
PDF
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
PPTX
Mongo db datatypes
PDF
03. ElasticSearch : Data In, Data Out
KEY
Mongo at Sailthru (MongoNYC 2011)
PDF
01 ElasticSearch : Getting Started
PDF
Introduction to Elasticsearch
PDF
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
PDF
Elastic search 검색
PDF
CouchDB Open Source Bridge
PPTX
Secure Payments Over Mixed Communication Media
PPTX
JSON-LD for RESTful services
PDF
Log file analysis by Peter Nikolow
PPT
From russia final_bluehat10
 
PPTX
Building Next-Generation Web APIs with JSON-LD and Hydra
PDF
Building a Social Network with MongoDB
PDF
DevTalks Cluj - Open-Source Technologies for Analyzing Text
Building Your First App with MongoDB
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Mongo db datatypes
03. ElasticSearch : Data In, Data Out
Mongo at Sailthru (MongoNYC 2011)
01 ElasticSearch : Getting Started
Introduction to Elasticsearch
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Elastic search 검색
CouchDB Open Source Bridge
Secure Payments Over Mixed Communication Media
JSON-LD for RESTful services
Log file analysis by Peter Nikolow
From russia final_bluehat10
 
Building Next-Generation Web APIs with JSON-LD and Hydra
Building a Social Network with MongoDB
DevTalks Cluj - Open-Source Technologies for Analyzing Text
Ad

Similar to SF ElasticSearch Meetup - How HipChat Scaled to 1B Messages (10)

PPTX
Couchbase usage at Symantec
PDF
Why and How to integrate Hadoop and NoSQL?
PDF
Softshake 2013: Introduction to NoSQL with Couchbase
PPT
Craig Brown speaks on ElasticSearch
PPT
How ElasticSearch lives in my DevOps life
PDF
elasticsearch
PPTX
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
PDF
How companies use NoSQL & Couchbase - NoSQL Now 2014
PDF
ElasticSearch - Suche im Zeitalter der Clouds
PDF
Introduction to NoSQL with Couchbase
Couchbase usage at Symantec
Why and How to integrate Hadoop and NoSQL?
Softshake 2013: Introduction to NoSQL with Couchbase
Craig Brown speaks on ElasticSearch
How ElasticSearch lives in my DevOps life
elasticsearch
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
How companies use NoSQL & Couchbase - NoSQL Now 2014
ElasticSearch - Suche im Zeitalter der Clouds
Introduction to NoSQL with Couchbase
Ad

More from Atlassian (20)

PPTX
International Women's Day 2020
PDF
10 emerging trends that will unbreak your workplace in 2020
PDF
Forge App Showcase
PDF
Let's Build an Editor Macro with Forge UI
PDF
Meet the Forge Runtime
PDF
Forge UI: A New Way to Customize the Atlassian User Experience
PDF
Take Action with Forge Triggers
PDF
Observability and Troubleshooting in Forge
PDF
Trusted by Default: The Forge Security & Privacy Model
PDF
Designing Forge UI: A Story of Designing an App UI System
PDF
Forge: Under the Hood
PDF
Access to User Activities - Activity Platform APIs
PDF
Design Your Next App with the Atlassian Vendor Sketch Plugin
PDF
Tear Up Your Roadmap and Get Out of the Building
PDF
Nailing Measurement: a Framework for Measuring Metrics that Matter
PDF
Building Apps With Color Blind Users in Mind
PDF
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
PDF
Beyond Diversity: A Guide to Building Balanced Teams
PDF
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
PDF
Building Apps With Enterprise in Mind
International Women's Day 2020
10 emerging trends that will unbreak your workplace in 2020
Forge App Showcase
Let's Build an Editor Macro with Forge UI
Meet the Forge Runtime
Forge UI: A New Way to Customize the Atlassian User Experience
Take Action with Forge Triggers
Observability and Troubleshooting in Forge
Trusted by Default: The Forge Security & Privacy Model
Designing Forge UI: A Story of Designing an App UI System
Forge: Under the Hood
Access to User Activities - Activity Platform APIs
Design Your Next App with the Atlassian Vendor Sketch Plugin
Tear Up Your Roadmap and Get Out of the Building
Nailing Measurement: a Framework for Measuring Metrics that Matter
Building Apps With Color Blind Users in Mind
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Beyond Diversity: A Guide to Building Balanced Teams
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Building Apps With Enterprise in Mind

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation theory and applications.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation_ Review paper, used for researhc scholars
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Unlocking AI with Model Context Protocol (MCP)
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation theory and applications.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

SF ElasticSearch Meetup - How HipChat Scaled to 1B Messages