SlideShare a Scribd company logo
1 of 47
Download to read offline
MongoDB in Production
Daniel Coupal
Senior Technical Services Engineer
MongoDB
Goal of the Presentation
1.  Walk you over common deployment problems seen by the support team
2.  Have an interactive session
Who am I?
•  Daniel Coupal
•  Previously a developer, manager and consultant
•  3 years with MongoDB
•  Roles
•  Technical Support Engineer
•  Consulting engagements with customers
•  Trainer on our Advanced Internals class for new hires
MongoDB Support Team
Main support offices in …
New York, Austin, Palo Alto, Sydney, Delhi, Tel Aviv and Dublin
Who are you?
•  How long have you been using MongoDB?
•  In Production or Development stage?
•  What presentations have you seen about MongoDB?
•  Been to MongoDB Conferences?
•  MongoDB Days?
•  Meetups or other MongoDB events?
•  What have you learned?
•  On-line training classes from University.mongodb.com?
•  Books on MongoDB?
What do you want to learn today?
•  The Story of NoSQL
•  MongoDB, the Company
•  Deploying guidelines
•  Common issues seen in Production
• 
• 
• 
The Story of NoSQL
Once upon a time
The Sun was shinning on the land of the Oracle …
Then came the Web
We’re gonna need a bigger database
NoSQL databases
•  Make use of newer technology
•  Scale horizontally (add more servers, instead of a bigger server)
•  Store richer data shapes vs “square data” in RDBMS
•  Faster for a given application
•  High Availability and Replication built in
•  Distributed Systems
Data is like Oil
•  Precious resource
•  Even more when refined
•  What was easy to extract/store has been done
•  Most of the data not in databases is likely not square and/or large datasets
•  New technology help you address what has not been processed
•  MongoDB is in a good position to be the database of choice for the remaining
data to be discovered
MongoDB – The Company
MongoDB - Company Overview
600 employees 1,000+ customers
Over $300 million in funding30+ offices around the world
MongoDB - Timeline
•  Originaly, 10gen
•  Founded in 2007
•  Released MongoDB 1.0 in 2009
•  MongoDB Inc
•  Since 2013
•  Acquired WiredTiger in 2014
•  MongoDB
•  Open source software
•  Contributions on tools, drivers, …
•  Most popular NoSQL database
Forrester Analysis – Q3 2016
•  MongoDB Leader in
•  Strategy
•  Current Offering
MongoDB - We hire!
Positions open in Palo Alto, Austin, NYC and for remote workers
•  http://www.mongodb.com/careers/positions
Technical service engineers in Palo Alto
•  MongoDB
•  MongoDB Tools
•  Proactive support
Deploying Guidelines
Security
•  SSL/X.509
•  Kerberos/LDAP
•  Data encryption at rest
•  Users
•  Firewall/security groups
Where are you deploying?
•  Own servers
•  AWS
•  Azure
•  Google
Deployment platform
•  MongoDB Ops Manager
•  MongoDB Cloud Manager
•  Chef
•  Puppet
•  Docker
Topology
•  How many nodes?
•  Primary / Secondary / Secondary (PSS)
•  Primary / Secondary / Arbiter (PSA)
•  More data nodes?
•  How many data centers?
Backups
•  Ops/Cloud Manager
•  File System Snapshots
•  mongodump/mongorestore
Most Common Problems in the Field
(not in any order)
Issue #1 – The NoSQL World is different
#1 – The NoSQL World is different
#1 – The NoSQL World is different
Relational World NoSQL World
Step 1 - Model the data Step 1 - Define the access patterns to the data
Step 2 - Write the queries to access the data Step 2 - Model the data
Step 3 - Denormalize the data
Example: Schema in MongoDB
physicians
hospitals
patients
records
procedures
Issue #2 – Have a Test Environment
#2 – Have a Test Environment
•  Excellent (A)
•  identical cluster
•  restore production data in test/staging/QA environment
•  Acceptable (B)
•  less shards with identical hardware and same amount of data per shard
•  Less desirable (C)
•  smaller hardware
•  much less data
•  non representative data
•  Not acceptable (F)
•  No test environment
Issue #3 – Look for Clues of Bad Queries
#3 – Look for Clues of Bad Queries
(slow queries are listed in mongod log)
3.2 format
2016-05-05T12:52:05.071-0700 I COMMAND [conn16] command test.twitter
command: find { find: "twitter", filter: { user.profile_background_image_url: /
biatwitter/ } } planSummary: COLLSCAN keysExamined:0 docsExamined:
102856 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:803
nreturned:2 reslen:3077 locks:{ Global: { acquireCount: { r: 1608 } }, Database:
{ acquireCount: { r: 804 } }, Collection: { acquireCount: { r: 804 } } }
protocol:op_command 151ms
Amount of work done
How many results?
Query should be fast!
#3 – Look for Clues of Bad Queries
(slow queries in mongod log)
2.6 format
2016-05-05T12:54:04.432-0700 [conn30] query test.twitter query: { user.profile_background_image_url: /biatwitter/ }
planSummary: COLLSCAN ntoreturn:0 ntoskip:0 nscanned:102856 nscannedObjects:102856 keyUpdates:0 numYields:0
locks(micros) r:170768 nreturned:2 reslen:2988 170ms
3.0 format
2016-05-05T12:53:42.291-0700 I COMMAND [conn9039] query test.twitter query: { user.profile_background_image_url: /
biatwitter/ } planSummary: COLLSCAN ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:102856 keyUpdates:0
writeConflicts:0 numYields:803 nreturned:2 reslen:2988 locks:{ Global: { acquireCount: { r: 1608 } }, MMAPV1Journal:
{ acquireCount: { r: 804 } }, Database: { acquireCount: { r: 804 } }, Collection: { acquireCount: { R: 804 } } } 159ms
3.2 format
2016-05-05T12:52:05.071-0700 I COMMAND [conn16] command test.twitter command: find { find: "twitter", filter:
{ user.profile_background_image_url: /biatwitter/ } } planSummary: COLLSCAN keysExamined:0 docsExamined:102856
cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:803 nreturned:2 reslen:3077 locks:{ Global: { acquireCount: { r:
1608 } }, Database: { acquireCount: { r: 804 } }, Collection: { acquireCount: { r: 804 } } } protocol:op_command 151ms
#3 – Look for Clues of Bad Queries
•  mtools for plots and
stats on queries
#3 – Look for Clues of Bad Queries
•  Cloud Manager (Premium groups) or Ops Manager
•  Suggested indexes !!!
•  Cloud Manager and Ops Manager
•  charts
•  Logs
•  Profiler
•  explain()
Issue #4 – Incorrect Production Settings
#4 – Incorrect Production Settings
•  Hardware
•  Don’t use:
•  NAS
•  other FS than xfs on Linux for WiredTiger
•  other FS than ext4 or xfs on Linux for MMAPv1
•  VM Settings
•  Don’t use ballooning/overcommit resources
•  OS Settings
•  ulimits high enough
•  Transparent Huge Pages off
•  Turn NUMA off, or use numactl to start the processes
•  low readahead for disks (32 instead of default of 256)
#4 – Incorrect Production Settings
•  Production notes
https://docs.mongodb.org/manual/administration/production-notes/
•  Warnings
•  At startup and in mongod.log
•  In Cloud Manager/Ops Manager
•  Support ticket
mdiag (in GitHub) will gather info to check
Issue #5 - Cloud/Ops Manager Agents always initiate
communications
#5 - Cloud/Ops Manager Agents always initiate
communications
#5 - Cloud/Ops Manager Agents always initiate
communications
Monitoring
Agent
Secondary SecondaryPrimary
Issue #6 - Knowledge is King
#6 - Knowledge is King
•  Use the right resources
•  MongoDB.com/presentations
•  Conferences: MongoDB Days/MongoDB World
•  Consulting packages
•  Production readiness, Rapid Start, Performance Tuning, Database Modernization, …
•  Commercial Support
•  Free Support (Google groups and Stack Overflow)
•  Training:
•  On-site classes
•  Public trainings classes @ MongoDB offices
•  Free education classes (M101 per language, M102, M202)
Conclusion
Take Away
1.  Remember 3 problems out of the 6 from this presentation
2.  Make 1 change in your application or deployment to prevent one issue
3.  If you do, this will be a good return on your hour spent at this presentation
Thank you!
Extras

More Related Content

What's hot

Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...MITSUNARI Shigeo
 
Interactive Data Analysis with Apache Flink @ Flink Meetup in Berlin
Interactive Data Analysis with Apache Flink @ Flink Meetup in BerlinInteractive Data Analysis with Apache Flink @ Flink Meetup in Berlin
Interactive Data Analysis with Apache Flink @ Flink Meetup in BerlinTill Rohrmann
 
Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...
Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...
Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...Lucidworks
 
CNIT 124: Ch 7: Capturing Traffic
CNIT 124: Ch 7: Capturing TrafficCNIT 124: Ch 7: Capturing Traffic
CNIT 124: Ch 7: Capturing TrafficSam Bowne
 
Ncku csie talk about Spark
Ncku csie talk about SparkNcku csie talk about Spark
Ncku csie talk about SparkGiivee The
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDBStone Gao
 
Python and Neo4j
Python and Neo4jPython and Neo4j
Python and Neo4jEric Lee
 
Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)Karel Minarik
 
Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...
Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...
Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...Lucidworks
 
Intro to Python for C# Developers
Intro to Python for C# DevelopersIntro to Python for C# Developers
Intro to Python for C# DevelopersSarah Dutkiewicz
 
ApacheCon Europe 2012 -Big Search 4 Big Data
ApacheCon Europe 2012 -Big Search 4 Big DataApacheCon Europe 2012 -Big Search 4 Big Data
ApacheCon Europe 2012 -Big Search 4 Big DataOpenSource Connections
 
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)Martin Traverso
 
Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaAmazee Labs
 
MySQL And Search At Craigslist
MySQL And Search At CraigslistMySQL And Search At Craigslist
MySQL And Search At CraigslistJeremy Zawodny
 
Hdfs 2016-hadoop-summit-dublin-v1
Hdfs 2016-hadoop-summit-dublin-v1Hdfs 2016-hadoop-summit-dublin-v1
Hdfs 2016-hadoop-summit-dublin-v1Chris Nauroth
 
ElasticSearch in action
ElasticSearch in actionElasticSearch in action
ElasticSearch in actionCodemotion
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Oleksiy Panchenko
 
When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...MongoDB
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)emiltamas
 

What's hot (20)

Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...
 
Interactive Data Analysis with Apache Flink @ Flink Meetup in Berlin
Interactive Data Analysis with Apache Flink @ Flink Meetup in BerlinInteractive Data Analysis with Apache Flink @ Flink Meetup in Berlin
Interactive Data Analysis with Apache Flink @ Flink Meetup in Berlin
 
Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...
Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...
Downtown SF Lucene/Solr Meetup: Developing Scalable User Search for PlayStati...
 
CNIT 124: Ch 7: Capturing Traffic
CNIT 124: Ch 7: Capturing TrafficCNIT 124: Ch 7: Capturing Traffic
CNIT 124: Ch 7: Capturing Traffic
 
Ncku csie talk about Spark
Ncku csie talk about SparkNcku csie talk about Spark
Ncku csie talk about Spark
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDB
 
Python and Neo4j
Python and Neo4jPython and Neo4j
Python and Neo4j
 
Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)Your Data, Your Search, ElasticSearch (EURUKO 2011)
Your Data, Your Search, ElasticSearch (EURUKO 2011)
 
Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...
Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...
Building a Real-Time News Search Engine: Presented by Ramkumar Aiyengar, Bloo...
 
Intro to Python for C# Developers
Intro to Python for C# DevelopersIntro to Python for C# Developers
Intro to Python for C# Developers
 
ApacheCon Europe 2012 -Big Search 4 Big Data
ApacheCon Europe 2012 -Big Search 4 Big DataApacheCon Europe 2012 -Big Search 4 Big Data
ApacheCon Europe 2012 -Big Search 4 Big Data
 
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
 
Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & Kibana
 
MySQL And Search At Craigslist
MySQL And Search At CraigslistMySQL And Search At Craigslist
MySQL And Search At Craigslist
 
Hdfs 2016-hadoop-summit-dublin-v1
Hdfs 2016-hadoop-summit-dublin-v1Hdfs 2016-hadoop-summit-dublin-v1
Hdfs 2016-hadoop-summit-dublin-v1
 
ElasticSearch in action
ElasticSearch in actionElasticSearch in action
ElasticSearch in action
 
Intro to Apache Solr
Intro to Apache SolrIntro to Apache Solr
Intro to Apache Solr
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
 
When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)
 

Viewers also liked

Viewers also liked (10)

Bcn retail lab informe final
Bcn retail lab  informe finalBcn retail lab  informe final
Bcn retail lab informe final
 
Herpes
HerpesHerpes
Herpes
 
Connecting Apps, Devices and Services
Connecting Apps, Devices and ServicesConnecting Apps, Devices and Services
Connecting Apps, Devices and Services
 
Albistea itxaso sukaldea
Albistea itxaso sukaldeaAlbistea itxaso sukaldea
Albistea itxaso sukaldea
 
Life In The Lab - Winter 2011
Life In The Lab - Winter 2011Life In The Lab - Winter 2011
Life In The Lab - Winter 2011
 
Linking your resources to the Data Web
Linking your resources to the Data WebLinking your resources to the Data Web
Linking your resources to the Data Web
 
Experiential Marketing
Experiential MarketingExperiential Marketing
Experiential Marketing
 
Negotiation Skills For Project Managers
Negotiation Skills For Project ManagersNegotiation Skills For Project Managers
Negotiation Skills For Project Managers
 
"Introducción a la PNL" By: Joseph O'connor
"Introducción a la PNL" By: Joseph O'connor"Introducción a la PNL" By: Joseph O'connor
"Introducción a la PNL" By: Joseph O'connor
 
Visual thinking usability coffee st gallen 19 03 2015
Visual thinking usability coffee st gallen 19 03 2015Visual thinking usability coffee st gallen 19 03 2015
Visual thinking usability coffee st gallen 19 03 2015
 

Similar to Silicon Valley Code Camp 2016 - MongoDB in production

Silicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDBSilicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDBDaniel Coupal
 
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelSilicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelDaniel Coupal
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in StartupsDusan Omercevic
 
Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)Oren Eini
 
Conceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónConceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónMongoDB
 
MongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDB
 
Operationalizing MongoDB at AOL
Operationalizing MongoDB at AOLOperationalizing MongoDB at AOL
Operationalizing MongoDB at AOLradiocats
 
Blue Teaming on a Budget of Zero
Blue Teaming on a Budget of ZeroBlue Teaming on a Budget of Zero
Blue Teaming on a Budget of ZeroKyle Bubp
 
Benchmarking at Parse
Benchmarking at ParseBenchmarking at Parse
Benchmarking at ParseTravis Redman
 
Advanced Benchmarking at Parse
Advanced Benchmarking at ParseAdvanced Benchmarking at Parse
Advanced Benchmarking at ParseMongoDB
 
scrazzl - A technical overview
scrazzl - A technical overviewscrazzl - A technical overview
scrazzl - A technical overviewscrazzl
 
Mongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-finalMongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-finalMongoDB
 
MongoDB at Gilt Groupe
MongoDB at Gilt GroupeMongoDB at Gilt Groupe
MongoDB at Gilt GroupeMongoDB
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware ProvisioningMongoDB
 
Community day 2013 applied architectures
Community day 2013   applied architecturesCommunity day 2013   applied architectures
Community day 2013 applied architecturesPanagiotis Kefalidis
 
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Databricks
 
From a student to an apache committer practice of apache io tdb
From a student to an apache committer  practice of apache io tdbFrom a student to an apache committer  practice of apache io tdb
From a student to an apache committer practice of apache io tdbjixuan1989
 
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015Datadog
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB
 

Similar to Silicon Valley Code Camp 2016 - MongoDB in production (20)

Silicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDBSilicon Valley Code Camp 2014 - Advanced MongoDB
Silicon Valley Code Camp 2014 - Advanced MongoDB
 
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelSilicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in Startups
 
Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)
 
Conceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producciónConceptos básicos. Seminario web 6: Despliegue de producción
Conceptos básicos. Seminario web 6: Despliegue de producción
 
MongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOL
 
Operationalizing MongoDB at AOL
Operationalizing MongoDB at AOLOperationalizing MongoDB at AOL
Operationalizing MongoDB at AOL
 
Blue Teaming on a Budget of Zero
Blue Teaming on a Budget of ZeroBlue Teaming on a Budget of Zero
Blue Teaming on a Budget of Zero
 
Benchmarking at Parse
Benchmarking at ParseBenchmarking at Parse
Benchmarking at Parse
 
Advanced Benchmarking at Parse
Advanced Benchmarking at ParseAdvanced Benchmarking at Parse
Advanced Benchmarking at Parse
 
scrazzl - A technical overview
scrazzl - A technical overviewscrazzl - A technical overview
scrazzl - A technical overview
 
Mongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-finalMongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-final
 
MongoDB at Gilt Groupe
MongoDB at Gilt GroupeMongoDB at Gilt Groupe
MongoDB at Gilt Groupe
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
 
Community day 2013 applied architectures
Community day 2013   applied architecturesCommunity day 2013   applied architectures
Community day 2013 applied architectures
 
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
 
From a student to an apache committer practice of apache io tdb
From a student to an apache committer  practice of apache io tdbFrom a student to an apache committer  practice of apache io tdb
From a student to an apache committer practice of apache io tdb
 
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOL
 

Recently uploaded

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Recently uploaded (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

Silicon Valley Code Camp 2016 - MongoDB in production

  • 1. MongoDB in Production Daniel Coupal Senior Technical Services Engineer MongoDB
  • 2. Goal of the Presentation 1.  Walk you over common deployment problems seen by the support team 2.  Have an interactive session
  • 3. Who am I? •  Daniel Coupal •  Previously a developer, manager and consultant •  3 years with MongoDB •  Roles •  Technical Support Engineer •  Consulting engagements with customers •  Trainer on our Advanced Internals class for new hires
  • 4. MongoDB Support Team Main support offices in … New York, Austin, Palo Alto, Sydney, Delhi, Tel Aviv and Dublin
  • 5. Who are you? •  How long have you been using MongoDB? •  In Production or Development stage? •  What presentations have you seen about MongoDB? •  Been to MongoDB Conferences? •  MongoDB Days? •  Meetups or other MongoDB events? •  What have you learned? •  On-line training classes from University.mongodb.com? •  Books on MongoDB?
  • 6. What do you want to learn today? •  The Story of NoSQL •  MongoDB, the Company •  Deploying guidelines •  Common issues seen in Production •  •  • 
  • 7. The Story of NoSQL
  • 8. Once upon a time The Sun was shinning on the land of the Oracle …
  • 10. We’re gonna need a bigger database
  • 11. NoSQL databases •  Make use of newer technology •  Scale horizontally (add more servers, instead of a bigger server) •  Store richer data shapes vs “square data” in RDBMS •  Faster for a given application •  High Availability and Replication built in •  Distributed Systems
  • 12. Data is like Oil •  Precious resource •  Even more when refined •  What was easy to extract/store has been done •  Most of the data not in databases is likely not square and/or large datasets •  New technology help you address what has not been processed •  MongoDB is in a good position to be the database of choice for the remaining data to be discovered
  • 13. MongoDB – The Company
  • 14. MongoDB - Company Overview 600 employees 1,000+ customers Over $300 million in funding30+ offices around the world
  • 15. MongoDB - Timeline •  Originaly, 10gen •  Founded in 2007 •  Released MongoDB 1.0 in 2009 •  MongoDB Inc •  Since 2013 •  Acquired WiredTiger in 2014 •  MongoDB •  Open source software •  Contributions on tools, drivers, … •  Most popular NoSQL database
  • 16. Forrester Analysis – Q3 2016 •  MongoDB Leader in •  Strategy •  Current Offering
  • 17. MongoDB - We hire! Positions open in Palo Alto, Austin, NYC and for remote workers •  http://www.mongodb.com/careers/positions Technical service engineers in Palo Alto •  MongoDB •  MongoDB Tools •  Proactive support
  • 19. Security •  SSL/X.509 •  Kerberos/LDAP •  Data encryption at rest •  Users •  Firewall/security groups
  • 20. Where are you deploying? •  Own servers •  AWS •  Azure •  Google
  • 21. Deployment platform •  MongoDB Ops Manager •  MongoDB Cloud Manager •  Chef •  Puppet •  Docker
  • 22. Topology •  How many nodes? •  Primary / Secondary / Secondary (PSS) •  Primary / Secondary / Arbiter (PSA) •  More data nodes? •  How many data centers?
  • 23. Backups •  Ops/Cloud Manager •  File System Snapshots •  mongodump/mongorestore
  • 24. Most Common Problems in the Field (not in any order)
  • 25. Issue #1 – The NoSQL World is different
  • 26. #1 – The NoSQL World is different
  • 27. #1 – The NoSQL World is different Relational World NoSQL World Step 1 - Model the data Step 1 - Define the access patterns to the data Step 2 - Write the queries to access the data Step 2 - Model the data Step 3 - Denormalize the data
  • 28. Example: Schema in MongoDB physicians hospitals patients records procedures
  • 29. Issue #2 – Have a Test Environment
  • 30. #2 – Have a Test Environment •  Excellent (A) •  identical cluster •  restore production data in test/staging/QA environment •  Acceptable (B) •  less shards with identical hardware and same amount of data per shard •  Less desirable (C) •  smaller hardware •  much less data •  non representative data •  Not acceptable (F) •  No test environment
  • 31. Issue #3 – Look for Clues of Bad Queries
  • 32. #3 – Look for Clues of Bad Queries (slow queries are listed in mongod log) 3.2 format 2016-05-05T12:52:05.071-0700 I COMMAND [conn16] command test.twitter command: find { find: "twitter", filter: { user.profile_background_image_url: / biatwitter/ } } planSummary: COLLSCAN keysExamined:0 docsExamined: 102856 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:803 nreturned:2 reslen:3077 locks:{ Global: { acquireCount: { r: 1608 } }, Database: { acquireCount: { r: 804 } }, Collection: { acquireCount: { r: 804 } } } protocol:op_command 151ms Amount of work done How many results? Query should be fast!
  • 33. #3 – Look for Clues of Bad Queries (slow queries in mongod log) 2.6 format 2016-05-05T12:54:04.432-0700 [conn30] query test.twitter query: { user.profile_background_image_url: /biatwitter/ } planSummary: COLLSCAN ntoreturn:0 ntoskip:0 nscanned:102856 nscannedObjects:102856 keyUpdates:0 numYields:0 locks(micros) r:170768 nreturned:2 reslen:2988 170ms 3.0 format 2016-05-05T12:53:42.291-0700 I COMMAND [conn9039] query test.twitter query: { user.profile_background_image_url: / biatwitter/ } planSummary: COLLSCAN ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:102856 keyUpdates:0 writeConflicts:0 numYields:803 nreturned:2 reslen:2988 locks:{ Global: { acquireCount: { r: 1608 } }, MMAPV1Journal: { acquireCount: { r: 804 } }, Database: { acquireCount: { r: 804 } }, Collection: { acquireCount: { R: 804 } } } 159ms 3.2 format 2016-05-05T12:52:05.071-0700 I COMMAND [conn16] command test.twitter command: find { find: "twitter", filter: { user.profile_background_image_url: /biatwitter/ } } planSummary: COLLSCAN keysExamined:0 docsExamined:102856 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:803 nreturned:2 reslen:3077 locks:{ Global: { acquireCount: { r: 1608 } }, Database: { acquireCount: { r: 804 } }, Collection: { acquireCount: { r: 804 } } } protocol:op_command 151ms
  • 34. #3 – Look for Clues of Bad Queries •  mtools for plots and stats on queries
  • 35. #3 – Look for Clues of Bad Queries •  Cloud Manager (Premium groups) or Ops Manager •  Suggested indexes !!! •  Cloud Manager and Ops Manager •  charts •  Logs •  Profiler •  explain()
  • 36. Issue #4 – Incorrect Production Settings
  • 37. #4 – Incorrect Production Settings •  Hardware •  Don’t use: •  NAS •  other FS than xfs on Linux for WiredTiger •  other FS than ext4 or xfs on Linux for MMAPv1 •  VM Settings •  Don’t use ballooning/overcommit resources •  OS Settings •  ulimits high enough •  Transparent Huge Pages off •  Turn NUMA off, or use numactl to start the processes •  low readahead for disks (32 instead of default of 256)
  • 38. #4 – Incorrect Production Settings •  Production notes https://docs.mongodb.org/manual/administration/production-notes/ •  Warnings •  At startup and in mongod.log •  In Cloud Manager/Ops Manager •  Support ticket mdiag (in GitHub) will gather info to check
  • 39. Issue #5 - Cloud/Ops Manager Agents always initiate communications
  • 40. #5 - Cloud/Ops Manager Agents always initiate communications
  • 41. #5 - Cloud/Ops Manager Agents always initiate communications Monitoring Agent Secondary SecondaryPrimary
  • 42. Issue #6 - Knowledge is King
  • 43. #6 - Knowledge is King •  Use the right resources •  MongoDB.com/presentations •  Conferences: MongoDB Days/MongoDB World •  Consulting packages •  Production readiness, Rapid Start, Performance Tuning, Database Modernization, … •  Commercial Support •  Free Support (Google groups and Stack Overflow) •  Training: •  On-site classes •  Public trainings classes @ MongoDB offices •  Free education classes (M101 per language, M102, M202)
  • 45. Take Away 1.  Remember 3 problems out of the 6 from this presentation 2.  Make 1 change in your application or deployment to prevent one issue 3.  If you do, this will be a good return on your hour spent at this presentation