SlideShare une entreprise Scribd logo
1  sur  19
MongoDB

 Part II
Admin UI

There are a number of open source projects that provide an
admin console to your MongoDB instances.

Some are web UI and some are native UI applications. 

   MongoHub is a native Mac OS app that has many great
   bells and whistles (my personal fav)
   MongoVUE is a native Windows .NET
   Many Ruby web based apps that run using Sinatra and
   MongoDB driver (Futon4Mongo, Mongo3, etc)
MongoHub details

Retail time CRUD operations monitoring
Multi-database views
Detailed collection views
Interactive querying
MySQL Import / Export
Monitoring and Diagnostics

The newer versions on MongoDB come with 
   mongostat
   sudo mongosniff --source NET lo0
Could be straight forward to hook up custom Nagios
alerts and monitoring with this data
Replication
Old way < 1.6                 New way >= 1.6
How it all works

MongoDB has a primary node who does the writes
The data is then replicated to the rest of the set
MongoDB has auto fail-over so if the current primary
pukes, then another node is "elected"
A write is theoretically complete when a "majority" of
the nodes in the set received the data
   ma·jor·i·ty noun mə-ˈjor-ə-tē
      In MongoDB terms it means there is at least 1
      primary and at least 1 other node running
      If only 1 node is left standing...well that sucks
The Ugly Truth

If a node fails-over during replication and all the nodes
haven't received it...
The data drops ;..(
MongoDB Make Believe Land




      Node 2   Node 3
MongoDB Make Believe Land




      Node 2   Node 3
MongoDB Make Believe Land




      Node 2   Node 3
MongoDB Make Believe Land




      Node 2   Node 3
How do I set that up?
Well, its super hard...
   ...NOT to do it right
I <3 MongoDB documentation
   http://www.mongodb.
   org/display/DOCS/Replica+Set+Tutorial
You can also do N nodes and 1 arbiter, where N % 2 == 0
"Shards are the secret sauce..."
I just shar(d|t)ed
Shards


                            Shard 2
Shard 1




          Node 2   Node 3
Choose wisely!

> When sharding you must
choose your shard key wisely
for an even distribution of load
and data
> It's best to choose composite
shard keys and determine the
most common queries
> Helps ensure your query
targets a single shard vs.
querying ALL shards
Map / Reduce
Map / Reduce

> You can write map/reduce
functions in the shell and with
any of the supported MongoDB
drivers
Logging with MongoDB

Got this link from the MongoDB
meetup at Engine Yard this past
week.

Thanks to Robert Stewart for
the great presentation:

http://www.slideshare.
net/WombatNation/logging-
app-behavior-to-mongo-db

Contenu connexe

Similaire à MongoDB Part 2

Invitation to mongo db @ Rakuten TechTalk
Invitation to mongo db @ Rakuten TechTalkInvitation to mongo db @ Rakuten TechTalk
Invitation to mongo db @ Rakuten TechTalkRyuji Tamagawa
 
Mdb dn 2016_07_elastic_search
Mdb dn 2016_07_elastic_searchMdb dn 2016_07_elastic_search
Mdb dn 2016_07_elastic_searchDaniel M. Farrell
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEANTroy Miles
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Consjohnrjenson
 
Mango Database - Web Development
Mango Database - Web DevelopmentMango Database - Web Development
Mango Database - Web Developmentmssaman
 
Social Analytics with MongoDB
Social Analytics with MongoDBSocial Analytics with MongoDB
Social Analytics with MongoDBPatrick Stokes
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialPHP Support
 
The elephant in the room mongo db + hadoop
The elephant in the room  mongo db + hadoopThe elephant in the room  mongo db + hadoop
The elephant in the room mongo db + hadoopiammutex
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & IntroductionJerwin Roy
 
Spatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSpatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSteven Pousty
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for BeginnersEnoch Joshua
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutioniFour Technolab Pvt. Ltd.
 
Mongo sf spatialmongo
Mongo sf spatialmongoMongo sf spatialmongo
Mongo sf spatialmongoSteven Pousty
 
The Little MongoDB Book - Karl Seguin
The Little MongoDB Book - Karl SeguinThe Little MongoDB Book - Karl Seguin
The Little MongoDB Book - Karl SeguinPaulo Fagundes
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesronwarshawsky
 

Similaire à MongoDB Part 2 (20)

Invitation to mongo db @ Rakuten TechTalk
Invitation to mongo db @ Rakuten TechTalkInvitation to mongo db @ Rakuten TechTalk
Invitation to mongo db @ Rakuten TechTalk
 
Mdb dn 2016_07_elastic_search
Mdb dn 2016_07_elastic_searchMdb dn 2016_07_elastic_search
Mdb dn 2016_07_elastic_search
 
Quick & Dirty & MEAN
Quick & Dirty & MEANQuick & Dirty & MEAN
Quick & Dirty & MEAN
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
Mongo db report
Mongo db reportMongo db report
Mongo db report
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
Mango Database - Web Development
Mango Database - Web DevelopmentMango Database - Web Development
Mango Database - Web Development
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Social Analytics with MongoDB
Social Analytics with MongoDBSocial Analytics with MongoDB
Social Analytics with MongoDB
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
MongoDB Basics Unileon
MongoDB Basics UnileonMongoDB Basics Unileon
MongoDB Basics Unileon
 
The elephant in the room mongo db + hadoop
The elephant in the room  mongo db + hadoopThe elephant in the room  mongo db + hadoop
The elephant in the room mongo db + hadoop
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & Introduction
 
Spatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSpatial mongo for PHP and Zend
Spatial mongo for PHP and Zend
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for Beginners
 
MongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & ExecutionMongoDB Introduction, Installation & Execution
MongoDB Introduction, Installation & Execution
 
Mongo sf spatialmongo
Mongo sf spatialmongoMongo sf spatialmongo
Mongo sf spatialmongo
 
Mongodb
MongodbMongodb
Mongodb
 
The Little MongoDB Book - Karl Seguin
The Little MongoDB Book - Karl SeguinThe Little MongoDB Book - Karl Seguin
The Little MongoDB Book - Karl Seguin
 
Mongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategiesMongo db pefrormance optimization strategies
Mongo db pefrormance optimization strategies
 

Dernier

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Dernier (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

MongoDB Part 2

  • 2. Admin UI There are a number of open source projects that provide an admin console to your MongoDB instances. Some are web UI and some are native UI applications.  MongoHub is a native Mac OS app that has many great bells and whistles (my personal fav) MongoVUE is a native Windows .NET Many Ruby web based apps that run using Sinatra and MongoDB driver (Futon4Mongo, Mongo3, etc)
  • 3. MongoHub details Retail time CRUD operations monitoring Multi-database views Detailed collection views Interactive querying MySQL Import / Export
  • 4. Monitoring and Diagnostics The newer versions on MongoDB come with  mongostat sudo mongosniff --source NET lo0 Could be straight forward to hook up custom Nagios alerts and monitoring with this data
  • 5. Replication Old way < 1.6 New way >= 1.6
  • 6. How it all works MongoDB has a primary node who does the writes The data is then replicated to the rest of the set MongoDB has auto fail-over so if the current primary pukes, then another node is "elected" A write is theoretically complete when a "majority" of the nodes in the set received the data ma·jor·i·ty noun mə-ˈjor-ə-tē In MongoDB terms it means there is at least 1 primary and at least 1 other node running If only 1 node is left standing...well that sucks
  • 7. The Ugly Truth If a node fails-over during replication and all the nodes haven't received it... The data drops ;..(
  • 8. MongoDB Make Believe Land Node 2 Node 3
  • 9. MongoDB Make Believe Land Node 2 Node 3
  • 10. MongoDB Make Believe Land Node 2 Node 3
  • 11. MongoDB Make Believe Land Node 2 Node 3
  • 12. How do I set that up? Well, its super hard... ...NOT to do it right I <3 MongoDB documentation http://www.mongodb. org/display/DOCS/Replica+Set+Tutorial You can also do N nodes and 1 arbiter, where N % 2 == 0
  • 13. "Shards are the secret sauce..."
  • 15. Shards Shard 2 Shard 1 Node 2 Node 3
  • 16. Choose wisely! > When sharding you must choose your shard key wisely for an even distribution of load and data > It's best to choose composite shard keys and determine the most common queries > Helps ensure your query targets a single shard vs. querying ALL shards
  • 18. Map / Reduce > You can write map/reduce functions in the shell and with any of the supported MongoDB drivers
  • 19. Logging with MongoDB Got this link from the MongoDB meetup at Engine Yard this past week. Thanks to Robert Stewart for the great presentation: http://www.slideshare. net/WombatNation/logging- app-behavior-to-mongo-db