What's new in MongoDB 2.6 at India event by company

Post on 02-Dec-2014

97 views 2 download

description

Matias presented new features of MongoDB 2.6 in an event at India.

Transcript of What's new in MongoDB 2.6 at India event by company

What’s New in MongoDB 2.6

Solutions Architect, MongoDB Inc.

Matias Cascallares

#MongoDBDays @mcascallares

Recent Release History

2.4 Mar‘13

2.6 Apr ’14

2.2 Aug ‘12

Aggregation Framework

Multi-Data Center Deployments

Improved Performance and Concurrency

Hash-based sharding

Text Search

V8 JavaScript engine

Faster counts

Biggest Release

Ever!

Main Improvement Areas

•  Operations

•  Integrated Search

•  Query System

•  Security

•  Performance & Stability

Operations

New Wire Protocol

Client Server

write()

getLastError(w, j)

result

Version 2.4

Version 2.6

write(w, j)

result

Bulk Writes

•  You need to import big set of documents

•  … and you want error control

•  … and you are concerned about performance

Bulk Writes - Ordered

Bulk Writes - Unordered

Maximum Time Per Query

Background Indexing and Replication

Secondary Secondary

Primary background Version

2.4 Version

2.6

Storage Allocation

•  In databases with great delete ratios we can face some fragmentation

•  Similar effect with those updates that increase document size

•  Defragment a database can be an expensive operation

•  Our goal? Reduce database fragmentation

Storage Allocation

•  usePowerOf2Sizes will be the default allocation method for new collections

56 bytes

64 bytes

102 bytes

128 bytes

Integrated Search

Text Search

•  Now production-ready

•  Integrated with query engine

•  Integrated with aggregation framework

•  Multi-language document support

Features

•  Language-specific tokenization and stemming

•  Stop words

•  Relevance ranking

•  Field boosting

Supported Languages

da – Danish en – English

nl – Dutch fi – Finish

fr – French de – German

hu – Hungarian it – Italian

no – Norwegian pt – Portuguese

ro – Romanian ru – Russian

es – Spanish sv – Swedish

tr - Turkish

Integrated within find()

Integrated within aggregate()

More Text Examples

Relevance

Forcing a Language

Query System Improvements

Query System Improvements

•  Index Intersection

•  Aggregation Framework

•  New Update Operators

Index Intersection

•  Simpler ad-hoc queries

•  Existing indexes can be combined to optimize a query –  Less Index Maintenance –  Smaller Working Set –  Lower Write Overhead –  More Adaptive –  Able to control potential intersections using QueryShape

Index Intersection

Aggregation Framework - Output

Aggregation Framework - Explain

Aggregation Framework - Explain

Aggregation Framework - Set Operators

•  $project operator in the aggregation pipeline now supports an expanded set of expressions –  $setIsSubset –  $setEquals –  $setDifference –  $setIntersection –  $setUnion –  $allElementsTrue –  $anyElementTrue

New Update Operators

•  $mul

•  $min/$max

•  $bit

•  $currentDate

•  New modifiers for $push

Security

Security

•  Authentication with LDAP (Enterprise only)

•  x.509 Certificates

•  User defined roles

•  Collection level security

•  Auditing (Enterprise only)

•  Windows Kerberos Support

State of Security in MongoDB 2.6

•  Authentication –  Who are you? –  X.509 authentication and Kerberos

•  Authorization –  What can you do? –  User Defined Roles, Collection-level Access Control

•  Auditing –  What have you done? –  DDL, User Manipulation, Authorization failure

Roles and Collection-level Security

Auditing

•  Schema actions

•  Replica Set actions

•  Authentication & Authorization actions

•  Other actions

Auditing – Dropping a collection

Auditing – Shutting down the server

Performance & Stability

Improving Performance and Scalability

•  Query router connection pooling

•  Mixed SSL connections

•  Expanded SNMP support

•  Oplog processing is MUCH faster

•  New commands for sharded environments

Thanks

Solutions Architect, MongoDB Inc.

Matias Cascallares

#MongoDBDays @mcascallares