SlideShare a Scribd company logo
What's New in MongoDB 2.4
Improvements made across…
•  Development
•  Operations
•  Performance
•  Security
•  Enterprise Features
MongoDB 2.4
Developer Improvements
Geospatial
New Geospatial Features
•  Polygon intersections
•  More accurate spherical model
•  $near and $within work with Aggregation
Framework
•  Analytics now location-aware
GeoJSON
•  Geospatial interchange format based on JSON
•  Supports Points,LineStrings & Polygons
•  Complete spec available at http://geojson.org
Point1 = {
type : "Point",
coordinates : [-73.947807, 40.663973]
}
somePoly = {
type : "Polygon",
coordinates : [[[40,5], [40,6],
[41,6], [41,5], [40,5]]]
}
GeoJSON
$GeoIntersects
•  Leverages GeoJSON
•  Geospatial query operator that selects all locations
that intersect with a GeoJSON object
•  Uses spherical geometry
point1 = { type: "Point", coordinates: [40, 5.5]}
line1 = { type: "LineString",
coordinates: [[40, 3.5], [40, 4.5]]};
somePoly = { type : "Polygon",
coordinates : [[[40,5], [40,6],
[41,6], [41,5], [40,5]]]};
res = c.find({ geo : {
"$geoIntersects" :
{"$geometry" : somePoly}
}});
$GeoIntersects
Aggregation Framework
New Aggregation Framework
Features
•  Introduced in 2.2,came of age in 2.4
•  Performance Improvements
•  3–5 x faster
•  Geo $near and $within support
•  $concat support
•  Support for Binary Data (pass through)
Text Search (beta)
Text Search (beta)
•  Real-time indexes
•  Case-insensitive
•  Stemming,tokenization & stop words for 15 languages
•  Index size is comparable with other full text search
implementations (larger than standard MongoDB
indexes)
•  BETA status…please use in dev & give feedback
Stemming Examples
•  { walk,walked,walking,walks } ⇒ walk
•  {magazine,magazines,magazine’s } ⇒ magazine
•  {runs,running,run,ran } ⇒ { run,ran }
Examples of English Stop Words
{ am,themselves,of,before,here,
while,what's,myself,ought,me,the,
into,about,this,do,can't,a,...}
Option 1: on the command line
$ mongod --setParameter textSearchEnabled=true
Option 2: as admin command to mongod or mongos
> db.adminCommand(
{ setParameter: 1, textSearchEnabled: true }
)
Enabling Text Search
db.t.ensureIndex(
{ title: "text", post: "text" },
{ weights: { title: 10, post: 5 }}
)
Create a Text Search Index
db.t.runCommand(
"text",
{ search: ""my first blog entry"" }
);
Run a Text Search Command
{
"queryDebugString":"blog|entri|first||||my first blog entry||",
"language" : "english",
"results" : [{
"score" : 12,
"obj" : {
"_id" : 1,
"title" : "1st post",
"post" : "this is my first blog entry."
}}],
"stats" : {
"nscanned" : 7,
"nscannedObjects" : 0,
"n" : 0,
"nfound" : 1,
"timeMicros" : 122
},
"ok" : 1
}
Text Search Result
Note: debug string shows the stemmed terms, stop-words deleted
New Update Operators
Capped Arrays
•  Provides the ability to manipulate arrays with
more control than ever before
•  $push now supports the following:
•  $each permits pushing multiple entries onto an
array
•  $slice maintains a fixed size array
•  Can be stacked with $sort
db.students.update(!
{ _id: 1 },!
{ $push: {!
scores: {!
$each: [!
{ attempt: 3, score: 7 },!
{ attempt: 4, score: 4 } ],!
$sort: { score: 1 },!
$slice: -3!
}!
}}!
)
Top 3 Scores
New Upsert Operator
db.products.update(!
{ _id: 1 },!
{ $setOnInsert: { defaultQty: 500, inStock: true },!
$set: { item: "apple" } },!
{ upsert: true }!
)
$setOnInsert
MongoDB 2.4
Operational Improvements
Hash-based Sharding
Hash-based Sharding
•  Easier to manage clusters
•  Less rebalancing 
•  More event distribution for reads and writes
•  Lower potential performance from range based,but more
consistent.
•  The hash stored in the hashed index is 64 bits of the 128
bit md5 hash
•  MongoDB can use the hashed index to support equality
queries,but hashed indexes do not support range queries.
db.activeCollection.ensureIndex(
{ field_to_hash: "hashed" }
)
Creating a Hashed Shard Key
Working Set Analyzer
Working Set Analyzer
•  Working Set: The set of data kept in memory
•  MongoDB performance best when working
set < RAM
•  Working set analyzer measures resources used
over time
•  Leads to more efficient MongoDB usage
db.serverStatus( { workingSet: 1 } )
db.runCommand( { serverStatus: 1, workingSet: 1 } )
"workingSet" : {
"note" : "thisIsAnEstimate",
"pagesInMemory" : <num>,
"computationTimeMicros" : <num>,
"overSeconds" : num
},
MongoStatus
Index Operation
Management
Index Operation Management
•  A single mongod instance can build multiple
indexes in the background at the same time.
•  db.killOp() can now kill foreground index builds
•  Improved validation of index types
db.currentOp()
{
"inprog" : [ {
"opid" : 45,
"active" : true,
"secs_running" : 2,
"op" : "insert",
"ns" : "test.system.indexes",
...
}]
}
db.killOp(45)
Index Operation Management
Replication Improvements
Role Based Privileges
Replication Improvements
•  Better detection of network hiccups (less false
negatives)
•  Faster initial sync when adding new secondary
MongoDB 2.4
Performance Improvements
V8 JavaScript Engine
•  Affects all JS processing including MapReduce,the
shell and $where queries 
•  Greater concurrency
•  User feedback very positive indicating dramatic
improvement in overall processing time with new
V8
Improvements All Over
•  Aggregation 3x–5x faster
•  Faster Counting
–  Low-cardinality index-based counts up to 20x faster
–  Better performance on counting,e.g.,count all the
males/females in my user list
•  Faster $elemMatch
MongoDB 2.4
Security Improvements
Role Based Privileges
Role Based Privileges
•  Builds on access controls introduced in 2.2
•  Users granted roles that have specific privileges per
database
•  Users can have multiple roles
•  Roles include
–  read
–  readWrite
–  userAdmin
–  dbAdmin
–  clusterAdmin
Role Based Privileges
Enhanced SSL Support
•  Supported in open source edition of MongoDB
•  Must be compiled using--ssl flag
•  Uses a standard .pem file that contains the SSL
certificate and key
•  Complete directions available in the MongoDB
documentation
http://docs.mongodb.org/manual/administration/ssl/
Introducing MongoDB
Enterprise 2.4
MongoDB Enterprise
•  Advanced Security
–  Kerberos authentication protocol
–  SSL support built in
•  Monitoring
–  On-Prem Monitoring-visualization,alerts on 100+ system metrics
–  Includes same features as (MMS)
•  Enterprise Software Integration
–  SNMP supports integration w/popular monitoring tools (e.g.,Nagios )
•  Certified OS Support
–  Red Hat/CentOS,Ubuntu and Amazon Linux
Subscriptions
Basic Standard Enterprise
Edition MongoDB MongoDB MongoDB Enterprise
SLA 4 hours 1 Hour 30 Minutes
Support
9am – 9pm ET
M – F
24x7x365 24x7x365
License AGPL Commercial Commercial
Price per Host $2,500 $5,000 $7,500

More Related Content

PPTX
Whats new in MongoDB 24
PDF
Webinar: Was ist neu in MongoDB 2.4
PPTX
MongoDB Shell Tips & Tricks
PPTX
Shell Tips & Tricks
PDF
Latinoware
PPTX
Webinar: Index Tuning and Evaluation
PPTX
Performance Tuning and Optimization
PPT
Introduction to MongoDB
Whats new in MongoDB 24
Webinar: Was ist neu in MongoDB 2.4
MongoDB Shell Tips & Tricks
Shell Tips & Tricks
Latinoware
Webinar: Index Tuning and Evaluation
Performance Tuning and Optimization
Introduction to MongoDB

What's hot (20)

PDF
Getting Started with MongoDB
PPTX
You, me, and jsonb
PPTX
Back to Basics: My First MongoDB Application
PPTX
Back to Basics Webinar 3: Introduction to Replica Sets
PPTX
MongoDB Best Practices for Developers
PDF
MongoDB Performance Tuning
PPTX
Getting Started with MongoDB and NodeJS
KEY
微博cache设计谈
PPTX
MongoDB-SESSION03
PPTX
MongoDB's New Aggregation framework
PDF
NoSQL Infrastructure - Late 2013
PPTX
Mastering the MongoDB Javascript Shell
PPT
5 Pitfalls to Avoid with MongoDB
PDF
Timyang新浪微博设计谈
KEY
MongoDB Aggregation Framework
ODP
Aggregation Framework in MongoDB Overview Part-1
PDF
mongoDB Performance
PDF
10 Key MongoDB Performance Indicators
PPTX
Breaking the Oracle Tie; High Performance OLTP and Analytics Using MongoDB
PPTX
High Performance, Scalable MongoDB in a Bare Metal Cloud
Getting Started with MongoDB
You, me, and jsonb
Back to Basics: My First MongoDB Application
Back to Basics Webinar 3: Introduction to Replica Sets
MongoDB Best Practices for Developers
MongoDB Performance Tuning
Getting Started with MongoDB and NodeJS
微博cache设计谈
MongoDB-SESSION03
MongoDB's New Aggregation framework
NoSQL Infrastructure - Late 2013
Mastering the MongoDB Javascript Shell
5 Pitfalls to Avoid with MongoDB
Timyang新浪微博设计谈
MongoDB Aggregation Framework
Aggregation Framework in MongoDB Overview Part-1
mongoDB Performance
10 Key MongoDB Performance Indicators
Breaking the Oracle Tie; High Performance OLTP and Analytics Using MongoDB
High Performance, Scalable MongoDB in a Bare Metal Cloud
Ad

Viewers also liked (17)

PDF
Microsoft power point ตารางแจกแจงความถี่-1
PPTX
Education for Sustainable Development
PPTX
Rokok
PPT
ตารางแจกแจงความถี่ 1
PPT
สื่อการสอนวิชาคณิตศาสตร์ลองทำ
PDF
Microsoft power point การวัดตำแหน่งที่ใช้สอน3
PPTX
PPT
การนำเสนอคุณธรรมและจริยธรรมสำหรับผู้นำ3
PDF
TESIPOLI
PDF
Froscon2011: How i learned to use sql and then learned not to use it
PDF
Building Your First MongoDB App
PDF
Failover or not to failover
PDF
Analytics with MongoDB Aggregation Framework and Hadoop Connector
PDF
Using and Benchmarking Galera in different architectures (PLUK 2012)
PDF
Introduction to new high performance storage engines in mongodb 3.0
PDF
Introduction to Galera
PPTX
Ergonomic Chair Product Design
Microsoft power point ตารางแจกแจงความถี่-1
Education for Sustainable Development
Rokok
ตารางแจกแจงความถี่ 1
สื่อการสอนวิชาคณิตศาสตร์ลองทำ
Microsoft power point การวัดตำแหน่งที่ใช้สอน3
การนำเสนอคุณธรรมและจริยธรรมสำหรับผู้นำ3
TESIPOLI
Froscon2011: How i learned to use sql and then learned not to use it
Building Your First MongoDB App
Failover or not to failover
Analytics with MongoDB Aggregation Framework and Hadoop Connector
Using and Benchmarking Galera in different architectures (PLUK 2012)
Introduction to new high performance storage engines in mongodb 3.0
Introduction to Galera
Ergonomic Chair Product Design
Ad

Similar to Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19 (20)

PPTX
1403 app dev series - session 5 - analytics
PDF
Using MongoDB and Python
PDF
2016 feb-23 pyugre-py_mongo
PPTX
Webinar: What's new in the .NET Driver
PDF
Social Data and Log Analysis Using MongoDB
PPTX
Webinar: Applikationsentwicklung mit MongoDB : Teil 5: Reporting & Aggregation
PPT
Mongo db tutorials
KEY
MongoDB at GUL
KEY
Mongodb intro
KEY
MongoDB at ZPUGDC
PDF
Buildingsocialanalyticstoolwithmongodb
KEY
PostgreSQLからMongoDBへ
PPTX
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
PPT
9b. Document-Oriented Databases lab
PPTX
KEY
PDF
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
PDF
Mongo indexes
PPTX
Indexing Strategies to Help You Scale
PDF
MongoDB: a gentle, friendly overview
1403 app dev series - session 5 - analytics
Using MongoDB and Python
2016 feb-23 pyugre-py_mongo
Webinar: What's new in the .NET Driver
Social Data and Log Analysis Using MongoDB
Webinar: Applikationsentwicklung mit MongoDB : Teil 5: Reporting & Aggregation
Mongo db tutorials
MongoDB at GUL
Mongodb intro
MongoDB at ZPUGDC
Buildingsocialanalyticstoolwithmongodb
PostgreSQLからMongoDBへ
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial Indexes
9b. Document-Oriented Databases lab
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
Mongo indexes
Indexing Strategies to Help You Scale
MongoDB: a gentle, friendly overview

More from Henrik Ingo (11)

PDF
ICPE25 Henrik Ingo Optimizing Hunter Nyrkiö slides (1).pdf
PDF
SPEC June 2025 - Using e-divisive means change detection in continuous benchm...
PDF
Meteor - The next generation software stack
PDF
MongoDB for Oracle Experts - OUGF Harmony 2014
PDF
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
PDF
Introducing Xtrabackup Manager
PDF
Froscon 2012 how big corporations play the open source game
PDF
Databases and the Cloud
PDF
Fixed in drizzle
PDF
Choosing a MySQL High Availability solution - Percona Live UK 2011
PDF
How to grow your open source project 10x and revenues 5x OSCON2011
ICPE25 Henrik Ingo Optimizing Hunter Nyrkiö slides (1).pdf
SPEC June 2025 - Using e-divisive means change detection in continuous benchm...
Meteor - The next generation software stack
MongoDB for Oracle Experts - OUGF Harmony 2014
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
Introducing Xtrabackup Manager
Froscon 2012 how big corporations play the open source game
Databases and the Cloud
Fixed in drizzle
Choosing a MySQL High Availability solution - Percona Live UK 2011
How to grow your open source project 10x and revenues 5x OSCON2011

Recently uploaded (20)

PDF
ai-archetype-understanding-the-personality-of-agentic-ai.pdf
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Smarter Business Operations Powered by IoT Remote Monitoring
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
PPTX
How to Build Crypto Derivative Exchanges from Scratch.pptx
PPTX
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
PPTX
Belt and Road Supply Chain Finance Blockchain Solution
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
How AI Agents Improve Data Accuracy and Consistency in Due Diligence.pdf
PDF
REPORT: Heating appliances market in Poland 2024
PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PDF
Google’s NotebookLM Unveils Video Overviews
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Modernizing your data center with Dell and AMD
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
ai-archetype-understanding-the-personality-of-agentic-ai.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
Smarter Business Operations Powered by IoT Remote Monitoring
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Sensors and Actuators in IoT Systems using pdf
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
How to Build Crypto Derivative Exchanges from Scratch.pptx
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
Belt and Road Supply Chain Finance Blockchain Solution
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
How AI Agents Improve Data Accuracy and Consistency in Due Diligence.pdf
REPORT: Heating appliances market in Poland 2024
creating-agentic-ai-solutions-leveraging-aws.pdf
Google’s NotebookLM Unveils Video Overviews
Chapter 3 Spatial Domain Image Processing.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Modernizing your data center with Dell and AMD
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift

Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19

  • 1. What's New in MongoDB 2.4
  • 2. Improvements made across… •  Development •  Operations •  Performance •  Security •  Enterprise Features
  • 5. New Geospatial Features •  Polygon intersections •  More accurate spherical model •  $near and $within work with Aggregation Framework •  Analytics now location-aware
  • 6. GeoJSON •  Geospatial interchange format based on JSON •  Supports Points,LineStrings & Polygons •  Complete spec available at http://geojson.org
  • 7. Point1 = { type : "Point", coordinates : [-73.947807, 40.663973] } somePoly = { type : "Polygon", coordinates : [[[40,5], [40,6], [41,6], [41,5], [40,5]]] } GeoJSON
  • 8. $GeoIntersects •  Leverages GeoJSON •  Geospatial query operator that selects all locations that intersect with a GeoJSON object •  Uses spherical geometry
  • 9. point1 = { type: "Point", coordinates: [40, 5.5]} line1 = { type: "LineString", coordinates: [[40, 3.5], [40, 4.5]]}; somePoly = { type : "Polygon", coordinates : [[[40,5], [40,6], [41,6], [41,5], [40,5]]]}; res = c.find({ geo : { "$geoIntersects" : {"$geometry" : somePoly} }}); $GeoIntersects
  • 11. New Aggregation Framework Features •  Introduced in 2.2,came of age in 2.4 •  Performance Improvements •  3–5 x faster •  Geo $near and $within support •  $concat support •  Support for Binary Data (pass through)
  • 13. Text Search (beta) •  Real-time indexes •  Case-insensitive •  Stemming,tokenization & stop words for 15 languages •  Index size is comparable with other full text search implementations (larger than standard MongoDB indexes) •  BETA status…please use in dev & give feedback
  • 14. Stemming Examples •  { walk,walked,walking,walks } ⇒ walk •  {magazine,magazines,magazine’s } ⇒ magazine •  {runs,running,run,ran } ⇒ { run,ran }
  • 15. Examples of English Stop Words { am,themselves,of,before,here, while,what's,myself,ought,me,the, into,about,this,do,can't,a,...}
  • 16. Option 1: on the command line $ mongod --setParameter textSearchEnabled=true Option 2: as admin command to mongod or mongos > db.adminCommand( { setParameter: 1, textSearchEnabled: true } ) Enabling Text Search
  • 17. db.t.ensureIndex( { title: "text", post: "text" }, { weights: { title: 10, post: 5 }} ) Create a Text Search Index
  • 18. db.t.runCommand( "text", { search: ""my first blog entry"" } ); Run a Text Search Command
  • 19. { "queryDebugString":"blog|entri|first||||my first blog entry||", "language" : "english", "results" : [{ "score" : 12, "obj" : { "_id" : 1, "title" : "1st post", "post" : "this is my first blog entry." }}], "stats" : { "nscanned" : 7, "nscannedObjects" : 0, "n" : 0, "nfound" : 1, "timeMicros" : 122 }, "ok" : 1 } Text Search Result Note: debug string shows the stemmed terms, stop-words deleted
  • 21. Capped Arrays •  Provides the ability to manipulate arrays with more control than ever before •  $push now supports the following: •  $each permits pushing multiple entries onto an array •  $slice maintains a fixed size array •  Can be stacked with $sort
  • 22. db.students.update(! { _id: 1 },! { $push: {! scores: {! $each: [! { attempt: 3, score: 7 },! { attempt: 4, score: 4 } ],! $sort: { score: 1 },! $slice: -3! }! }}! ) Top 3 Scores
  • 24. db.products.update(! { _id: 1 },! { $setOnInsert: { defaultQty: 500, inStock: true },! $set: { item: "apple" } },! { upsert: true }! ) $setOnInsert
  • 27. Hash-based Sharding •  Easier to manage clusters •  Less rebalancing  •  More event distribution for reads and writes •  Lower potential performance from range based,but more consistent. •  The hash stored in the hashed index is 64 bits of the 128 bit md5 hash •  MongoDB can use the hashed index to support equality queries,but hashed indexes do not support range queries.
  • 30. Working Set Analyzer •  Working Set: The set of data kept in memory •  MongoDB performance best when working set < RAM •  Working set analyzer measures resources used over time •  Leads to more efficient MongoDB usage
  • 31. db.serverStatus( { workingSet: 1 } ) db.runCommand( { serverStatus: 1, workingSet: 1 } ) "workingSet" : { "note" : "thisIsAnEstimate", "pagesInMemory" : <num>, "computationTimeMicros" : <num>, "overSeconds" : num }, MongoStatus
  • 33. Index Operation Management •  A single mongod instance can build multiple indexes in the background at the same time. •  db.killOp() can now kill foreground index builds •  Improved validation of index types
  • 34. db.currentOp() { "inprog" : [ { "opid" : 45, "active" : true, "secs_running" : 2, "op" : "insert", "ns" : "test.system.indexes", ... }] } db.killOp(45) Index Operation Management
  • 36. Role Based Privileges Replication Improvements •  Better detection of network hiccups (less false negatives) •  Faster initial sync when adding new secondary
  • 38. V8 JavaScript Engine •  Affects all JS processing including MapReduce,the shell and $where queries  •  Greater concurrency •  User feedback very positive indicating dramatic improvement in overall processing time with new V8
  • 39. Improvements All Over •  Aggregation 3x–5x faster •  Faster Counting –  Low-cardinality index-based counts up to 20x faster –  Better performance on counting,e.g.,count all the males/females in my user list •  Faster $elemMatch
  • 41. Role Based Privileges Role Based Privileges •  Builds on access controls introduced in 2.2 •  Users granted roles that have specific privileges per database •  Users can have multiple roles •  Roles include –  read –  readWrite –  userAdmin –  dbAdmin –  clusterAdmin
  • 42. Role Based Privileges Enhanced SSL Support •  Supported in open source edition of MongoDB •  Must be compiled using--ssl flag •  Uses a standard .pem file that contains the SSL certificate and key •  Complete directions available in the MongoDB documentation http://docs.mongodb.org/manual/administration/ssl/
  • 44. MongoDB Enterprise •  Advanced Security –  Kerberos authentication protocol –  SSL support built in •  Monitoring –  On-Prem Monitoring-visualization,alerts on 100+ system metrics –  Includes same features as (MMS) •  Enterprise Software Integration –  SNMP supports integration w/popular monitoring tools (e.g.,Nagios ) •  Certified OS Support –  Red Hat/CentOS,Ubuntu and Amazon Linux
  • 45. Subscriptions Basic Standard Enterprise Edition MongoDB MongoDB MongoDB Enterprise SLA 4 hours 1 Hour 30 Minutes Support 9am – 9pm ET M – F 24x7x365 24x7x365 License AGPL Commercial Commercial Price per Host $2,500 $5,000 $7,500