SlideShare a Scribd company logo
Julie Sommerville
jsommerville@businessinsider.com
DB1 primary                     DB3 primary

  businessinsider                  bi_analytics

           64GB                          16GB


Web1                            DB2 - Secondary

 arbiter businessinsider
                               businessinsider port xxxxx
 arbiter bi_analytics
                               bi_analytics port yyyyyy     32GB
                        16GB
It’s very easy to add a new nodes to a replica set


Start the process on the new server:
    mkdir /data/db
   mongod --port xxx --dbpath /data/db --replSet setname

Add the node on the Primary DB
  rs.add(“[hostname]:port”);
Most of the operations we perform on the analytics db are atomic in-place updates :

 analytics.heatmap.update(
  {
   homepage_id:"4ecfb4eefcda248b89000003",
   uri : "/ron-paul-slams-trump-joins-huntsman-in-sitting-out-circus-like-debate-2011-12"
   },
   {
       $inc : {views : 1},
       $set : {updated_at : {"sec":1329587057,"usec":175000}} }},
       true // upsert
)
Check this
Process
Example: adding a new field to an object
In the console

> var myObj = {name: 'julie', role: "developer"}

//creates the foo collection and inserts an object
> db.foo.save(myObj)

> db.foo.find()
{ "_id" : ObjectId("4f418251f4dd8d3d88a776ea"), "name" : "julie", "role" : "developer" }

// Add a new field
var julie = db.foo.findOne()
{
       "_id" : ObjectId("4f418251f4dd8d3d88a776ea"),
       "name" : "julie",
       "role" : "developer"
}
> julie.last_name = "sommerville'

> db.foo.save(julie)

> db.foo.find().pretty()
{
      "_id" : ObjectId("4f418251f4dd8d3d88a776ea"),
      "name" : "julie",
      "role" : "developer",
      "last_name" : "sommerville"
}

(pretty just makes it pretty)
Some Examples from our DB
Post Object: contains comments, many posts will have way more than a couple of comments

db.blog.posts.findOne({comments : {$exists:true}, comment_count : {$gte: 1}, ts : {$gte: start}})
{
    "_id" : ObjectId("4d4798c949e2aef0100d0000"),
    "attached_images" : [ ],
    "author" : "Ed Dolan",
    "author_id" : ObjectId("4d121ca0ccd1d5d337000000"),
    "autotweet" : false,
    "badges" : [ ],
    "browser_title" : null,
    "categories" : [ ],
    "cls" : "entry",
    "comment_count" : 1,
    "comment_thread_count" : 1,
    "comments" : [
         {
               "cid" : ObjectId("4d482923cadcbb310a080000"),
               "ts" : ISODate("2011-02-01T15:39:15.541Z"),
               "ip" : "113.53.150.3",
               "author" : "kenhow",
               "email" : "info@howincorporated.com",
               "url" : "http://howincorporated.com",
               "user_id" : ObjectId("4d32fceaccd1d53d7b010000"),
               "text" : "In other words: nothing to worry about"
         }
    ],
We also store the Replies to comments :

     {
               "author" : "LS",
               "cid" : ObjectId("4eda72376bb3f72279000009"),
               "email" : "lawrenceshapiro@gmail.com",
               "flags" : [ ],
               "ip" : "74.68.112.217",
               "rate_down" : 0,
               "rate_up" : 6,
               "raters" : {
                      "$ref" : "blog.comments.raters",
                      "$id" : ObjectId("4eda72376bb3f72279000008")
               },
               "replies" : [
                      {
                              "cid" : ObjectId("4eda800b69beddf55900004f"),
                              "author" : "Skepticus Maximus",
                              "email" : "henry1807@yahoo.com",
                              "flags" : [ ],
                              "ip" : "66.159.194.20",
                              "rate_down" : 0,
                              "rate_up" : 1,
                              "raters" : {
                                     "$ref" : "blog.comments.raters",
                                     "$id" : ObjectId("4eda800b69beddf55900004e")
                              },
                              "reply" : ObjectId("4eda72376bb3f72279000009"),
                              "reply_author" : "LS",
                              "text" : "No, it's perfectly natural - nature's way to make sure the species continues",
                              "ts" : ISODate("2011-12-03T20:01:15.930Z"),
                              "url" : "",
                              "session_id" : ObjectId("4eda76e3eab8ea9f4d00003d")
                      },

* Fast retrieval - no joins
MMS (MongoDB Monitoring Service)

* Really nice stats with the ability to “zoom” in (minute, 5min, hour etc.).
* If the data base is acting up you can go in and see where the problem may lie

-- Num Collections
-- Data Size in the DB and in storage
-- Avg. doc size
-- Index Sizes
-- Replica Set Stats
-- page faults
-- the lock queue (reads and writes)
total number of contiguously allocated chunks of
         datafile space for the database
num commands




               index access and hits
secondary shouldn’t be more than this number
                 hours behind
shows slow ops
Sharding
- Probably on our main database
- Help deal with load/num of connections

More Related Content

What's hot

Schema design
Schema designSchema design
Schema design
christkv
 
Mongo db for c# developers
Mongo db for c# developersMongo db for c# developers
Mongo db for c# developers
Simon Elliston Ball
 
Operational Intelligence with MongoDB Webinar
Operational Intelligence with MongoDB WebinarOperational Intelligence with MongoDB Webinar
Operational Intelligence with MongoDB WebinarMongoDB
 
20110514 mongo dbチューニング
20110514 mongo dbチューニング20110514 mongo dbチューニング
20110514 mongo dbチューニング
Yuichi Matsuo
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
MongoDB
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() Output
MongoDB
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2Takahiro Inoue
 
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right WayMongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB
 
Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2
MongoDB
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤Takahiro Inoue
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDB
Jonathan Weiss
 
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Myles Braithwaite
 
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB
 
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...
MongoDB
 
Map/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDBMap/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDB
Uwe Printz
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Groupkchodorow
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation Framework
MongoDB
 
MongoDB - Aggregation Pipeline
MongoDB - Aggregation PipelineMongoDB - Aggregation Pipeline
MongoDB - Aggregation Pipeline
Jason Terpko
 
MongoDB
MongoDBMongoDB

What's hot (20)

Schema design
Schema designSchema design
Schema design
 
Mongo db for c# developers
Mongo db for c# developersMongo db for c# developers
Mongo db for c# developers
 
Mongo db for C# Developers
Mongo db for C# DevelopersMongo db for C# Developers
Mongo db for C# Developers
 
Operational Intelligence with MongoDB Webinar
Operational Intelligence with MongoDB WebinarOperational Intelligence with MongoDB Webinar
Operational Intelligence with MongoDB Webinar
 
20110514 mongo dbチューニング
20110514 mongo dbチューニング20110514 mongo dbチューニング
20110514 mongo dbチューニング
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
 
MongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() OutputMongoDB World 2016: Deciphering .explain() Output
MongoDB World 2016: Deciphering .explain() Output
 
MongoDB全機能解説2
MongoDB全機能解説2MongoDB全機能解説2
MongoDB全機能解説2
 
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right WayMongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
MongoDB Europe 2016 - ETL for Pros – Getting Data Into MongoDB The Right Way
 
Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2Agg framework selectgroup feb2015 v2
Agg framework selectgroup feb2015 v2
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDB
 
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
 
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
MongoDB Europe 2016 - Enabling the Internet of Things at Proximus - Belgium's...
 
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...
 
Map/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDBMap/Confused? A practical approach to Map/Reduce with MongoDB
Map/Confused? A practical approach to Map/Reduce with MongoDB
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Group
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation Framework
 
MongoDB - Aggregation Pipeline
MongoDB - Aggregation PipelineMongoDB - Aggregation Pipeline
MongoDB - Aggregation Pipeline
 
MongoDB
MongoDBMongoDB
MongoDB
 

Viewers also liked

Internet of things (IoT)
Internet of things (IoT)Internet of things (IoT)
Internet of things (IoT)
Ameer Sameer
 
Internet of things (iot)
Internet of things (iot)Internet of things (iot)
Internet of things (iot)
sankar s
 
Tech Trends 2015: The fusion of business and IT
Tech Trends 2015: The fusion of business and ITTech Trends 2015: The fusion of business and IT
Tech Trends 2015: The fusion of business and IT
Deloitte United States
 
Strategy, Not Technology, Drives Digital Transformation
Strategy, Not Technology, Drives Digital TransformationStrategy, Not Technology, Drives Digital Transformation
Strategy, Not Technology, Drives Digital Transformation
Deloitte United States
 
Moving digital transformation forward: Findings from the 2016 digital busines...
Moving digital transformation forward: Findings from the 2016 digital busines...Moving digital transformation forward: Findings from the 2016 digital busines...
Moving digital transformation forward: Findings from the 2016 digital busines...
Deloitte United States
 
101 Digital Transformation Statistics (2016)
101 Digital Transformation Statistics (2016) 101 Digital Transformation Statistics (2016)
101 Digital Transformation Statistics (2016)
Jake Hird
 
Think Again: Media + Tech 2014
Think Again: Media + Tech 2014Think Again: Media + Tech 2014
Think Again: Media + Tech 2014
Activate
 
Redefiners: Capturing Media Growth Dollars
Redefiners: Capturing Media Growth DollarsRedefiners: Capturing Media Growth Dollars
Redefiners: Capturing Media Growth DollarsActivate
 
Activate: What Matters
Activate: What MattersActivate: What Matters
Activate: What Matters
Activate
 
What Will Matter For Media-Tech
What Will Matter For Media-TechWhat Will Matter For Media-Tech
What Will Matter For Media-Tech
Activate
 
How to develop a digital strategy
How to develop a digital strategyHow to develop a digital strategy
How to develop a digital strategy
FUSE Marketing Group
 
Managing your Digital Transformation
Managing your Digital TransformationManaging your Digital Transformation
Managing your Digital Transformation
Scopernia
 
5 questions about the IoT (Internet of Things)
5 questions about the IoT (Internet of Things) 5 questions about the IoT (Internet of Things)
5 questions about the IoT (Internet of Things)
Deloitte United States
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
Cisco Services
 
Exploiting The Potential Of Big Data
Exploiting The Potential Of Big DataExploiting The Potential Of Big Data
Exploiting The Potential Of Big Data
Activate
 
Words that Sell
Words that SellWords that Sell
Words that Sell
HubSpot
 
What is the Internet of Things?
What is the Internet of Things?What is the Internet of Things?
What is the Internet of Things?
Felix Grovit
 
What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?
Dr. Mazlan Abbas
 
Top Digital Transformation Trends and Priorities for 2016
Top Digital Transformation Trends and Priorities for 2016Top Digital Transformation Trends and Priorities for 2016
Top Digital Transformation Trends and Priorities for 2016
Charlene Li
 
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-gInternet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
Mohan Kumar G
 

Viewers also liked (20)

Internet of things (IoT)
Internet of things (IoT)Internet of things (IoT)
Internet of things (IoT)
 
Internet of things (iot)
Internet of things (iot)Internet of things (iot)
Internet of things (iot)
 
Tech Trends 2015: The fusion of business and IT
Tech Trends 2015: The fusion of business and ITTech Trends 2015: The fusion of business and IT
Tech Trends 2015: The fusion of business and IT
 
Strategy, Not Technology, Drives Digital Transformation
Strategy, Not Technology, Drives Digital TransformationStrategy, Not Technology, Drives Digital Transformation
Strategy, Not Technology, Drives Digital Transformation
 
Moving digital transformation forward: Findings from the 2016 digital busines...
Moving digital transformation forward: Findings from the 2016 digital busines...Moving digital transformation forward: Findings from the 2016 digital busines...
Moving digital transformation forward: Findings from the 2016 digital busines...
 
101 Digital Transformation Statistics (2016)
101 Digital Transformation Statistics (2016) 101 Digital Transformation Statistics (2016)
101 Digital Transformation Statistics (2016)
 
Think Again: Media + Tech 2014
Think Again: Media + Tech 2014Think Again: Media + Tech 2014
Think Again: Media + Tech 2014
 
Redefiners: Capturing Media Growth Dollars
Redefiners: Capturing Media Growth DollarsRedefiners: Capturing Media Growth Dollars
Redefiners: Capturing Media Growth Dollars
 
Activate: What Matters
Activate: What MattersActivate: What Matters
Activate: What Matters
 
What Will Matter For Media-Tech
What Will Matter For Media-TechWhat Will Matter For Media-Tech
What Will Matter For Media-Tech
 
How to develop a digital strategy
How to develop a digital strategyHow to develop a digital strategy
How to develop a digital strategy
 
Managing your Digital Transformation
Managing your Digital TransformationManaging your Digital Transformation
Managing your Digital Transformation
 
5 questions about the IoT (Internet of Things)
5 questions about the IoT (Internet of Things) 5 questions about the IoT (Internet of Things)
5 questions about the IoT (Internet of Things)
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Exploiting The Potential Of Big Data
Exploiting The Potential Of Big DataExploiting The Potential Of Big Data
Exploiting The Potential Of Big Data
 
Words that Sell
Words that SellWords that Sell
Words that Sell
 
What is the Internet of Things?
What is the Internet of Things?What is the Internet of Things?
What is the Internet of Things?
 
What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?What exactly is the "Internet of Things"?
What exactly is the "Internet of Things"?
 
Top Digital Transformation Trends and Priorities for 2016
Top Digital Transformation Trends and Priorities for 2016Top Digital Transformation Trends and Priorities for 2016
Top Digital Transformation Trends and Priorities for 2016
 
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-gInternet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
 

Similar to Mongo db presentation

Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDB
MongoDB
 
Building Apps with MongoDB
Building Apps with MongoDBBuilding Apps with MongoDB
Building Apps with MongoDB
Nate Abele
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
christkv
 
MongoDB
MongoDBMongoDB
MongoDB
Steve Klabnik
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance TuningMongoDB
 
Starting with MongoDB
Starting with MongoDBStarting with MongoDB
Starting with MongoDB
DoThinger
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011
djdunlop
 
ActiveRecord vs Mongoid
ActiveRecord vs MongoidActiveRecord vs Mongoid
ActiveRecord vs Mongoid
Ivan Nemytchenko
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data ModelingDATAVERSITY
 
Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Java
antoinegirbal
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
Shuai Liu
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
MongoDB Aggregation
MongoDB Aggregation MongoDB Aggregation
MongoDB Aggregation
Amit Ghosh
 
Montreal Elasticsearch Meetup
Montreal Elasticsearch MeetupMontreal Elasticsearch Meetup
Montreal Elasticsearch Meetup
Loïc Bertron
 
Introduction to solr
Introduction to solrIntroduction to solr
Introduction to solr
Sematext Group, Inc.
 
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in Documents
Joe Drumgoole
 
MongoDB, PHP and the cloud - php cloud summit 2011
MongoDB, PHP and the cloud - php cloud summit 2011MongoDB, PHP and the cloud - php cloud summit 2011
MongoDB, PHP and the cloud - php cloud summit 2011
Steven Francia
 
Back to Basics Webinar 3: Schema Design Thinking in Documents
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in Documents
MongoDB
 

Similar to Mongo db presentation (20)

Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDB
 
Building Apps with MongoDB
Building Apps with MongoDBBuilding Apps with MongoDB
Building Apps with MongoDB
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
Latinoware
LatinowareLatinoware
Latinoware
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
Starting with MongoDB
Starting with MongoDBStarting with MongoDB
Starting with MongoDB
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011
 
ActiveRecord vs Mongoid
ActiveRecord vs MongoidActiveRecord vs Mongoid
ActiveRecord vs Mongoid
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling
 
Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Java
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
 
Data exchange formats
Data exchange formatsData exchange formats
Data exchange formats
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
 
MongoDB Aggregation
MongoDB Aggregation MongoDB Aggregation
MongoDB Aggregation
 
Montreal Elasticsearch Meetup
Montreal Elasticsearch MeetupMontreal Elasticsearch Meetup
Montreal Elasticsearch Meetup
 
Introduction to solr
Introduction to solrIntroduction to solr
Introduction to solr
 
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in Documents
 
MongoDB, PHP and the cloud - php cloud summit 2011
MongoDB, PHP and the cloud - php cloud summit 2011MongoDB, PHP and the cloud - php cloud summit 2011
MongoDB, PHP and the cloud - php cloud summit 2011
 
Back to Basics Webinar 3: Schema Design Thinking in Documents
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in Documents
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Mongo db presentation

  • 2.
  • 3.
  • 4. DB1 primary DB3 primary businessinsider bi_analytics 64GB 16GB Web1 DB2 - Secondary arbiter businessinsider businessinsider port xxxxx arbiter bi_analytics bi_analytics port yyyyyy 32GB 16GB
  • 5. It’s very easy to add a new nodes to a replica set Start the process on the new server: mkdir /data/db mongod --port xxx --dbpath /data/db --replSet setname Add the node on the Primary DB rs.add(“[hostname]:port”);
  • 6.
  • 7. Most of the operations we perform on the analytics db are atomic in-place updates : analytics.heatmap.update( { homepage_id:"4ecfb4eefcda248b89000003", uri : "/ron-paul-slams-trump-joins-huntsman-in-sitting-out-circus-like-debate-2011-12" }, { $inc : {views : 1}, $set : {updated_at : {"sec":1329587057,"usec":175000}} }}, true // upsert )
  • 10.
  • 11.
  • 12. Example: adding a new field to an object In the console > var myObj = {name: 'julie', role: "developer"} //creates the foo collection and inserts an object > db.foo.save(myObj) > db.foo.find() { "_id" : ObjectId("4f418251f4dd8d3d88a776ea"), "name" : "julie", "role" : "developer" } // Add a new field var julie = db.foo.findOne() { "_id" : ObjectId("4f418251f4dd8d3d88a776ea"), "name" : "julie", "role" : "developer" } > julie.last_name = "sommerville' > db.foo.save(julie) > db.foo.find().pretty() { "_id" : ObjectId("4f418251f4dd8d3d88a776ea"), "name" : "julie", "role" : "developer", "last_name" : "sommerville" } (pretty just makes it pretty)
  • 13.
  • 14. Some Examples from our DB Post Object: contains comments, many posts will have way more than a couple of comments db.blog.posts.findOne({comments : {$exists:true}, comment_count : {$gte: 1}, ts : {$gte: start}}) { "_id" : ObjectId("4d4798c949e2aef0100d0000"), "attached_images" : [ ], "author" : "Ed Dolan", "author_id" : ObjectId("4d121ca0ccd1d5d337000000"), "autotweet" : false, "badges" : [ ], "browser_title" : null, "categories" : [ ], "cls" : "entry", "comment_count" : 1, "comment_thread_count" : 1, "comments" : [ { "cid" : ObjectId("4d482923cadcbb310a080000"), "ts" : ISODate("2011-02-01T15:39:15.541Z"), "ip" : "113.53.150.3", "author" : "kenhow", "email" : "info@howincorporated.com", "url" : "http://howincorporated.com", "user_id" : ObjectId("4d32fceaccd1d53d7b010000"), "text" : "In other words: nothing to worry about" } ],
  • 15. We also store the Replies to comments : { "author" : "LS", "cid" : ObjectId("4eda72376bb3f72279000009"), "email" : "lawrenceshapiro@gmail.com", "flags" : [ ], "ip" : "74.68.112.217", "rate_down" : 0, "rate_up" : 6, "raters" : { "$ref" : "blog.comments.raters", "$id" : ObjectId("4eda72376bb3f72279000008") }, "replies" : [ { "cid" : ObjectId("4eda800b69beddf55900004f"), "author" : "Skepticus Maximus", "email" : "henry1807@yahoo.com", "flags" : [ ], "ip" : "66.159.194.20", "rate_down" : 0, "rate_up" : 1, "raters" : { "$ref" : "blog.comments.raters", "$id" : ObjectId("4eda800b69beddf55900004e") }, "reply" : ObjectId("4eda72376bb3f72279000009"), "reply_author" : "LS", "text" : "No, it's perfectly natural - nature's way to make sure the species continues", "ts" : ISODate("2011-12-03T20:01:15.930Z"), "url" : "", "session_id" : ObjectId("4eda76e3eab8ea9f4d00003d") }, * Fast retrieval - no joins
  • 16.
  • 17.
  • 18.
  • 19. MMS (MongoDB Monitoring Service) * Really nice stats with the ability to “zoom” in (minute, 5min, hour etc.). * If the data base is acting up you can go in and see where the problem may lie -- Num Collections -- Data Size in the DB and in storage -- Avg. doc size -- Index Sizes -- Replica Set Stats -- page faults -- the lock queue (reads and writes)
  • 20. total number of contiguously allocated chunks of datafile space for the database
  • 21.
  • 22. num commands index access and hits
  • 23. secondary shouldn’t be more than this number hours behind
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Sharding - Probably on our main database - Help deal with load/num of connections

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n