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

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 

Recently uploaded (20)

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 

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