SlideShare a Scribd company logo
MongoDB	
  Sharding	
  
fundamentals	
  
Antonios	
  Giannopoulos	
  	
  
Database	
  Administrator	
  at	
  
ObjectRocket	
  by	
  Rackspace	
  
Background	
  
-­‐  14	
  years	
  in	
  databases	
  and	
  system	
  engineering	
  
-­‐  NoSQL	
  DBA	
  @	
  ObjectRocket	
  by	
  Rackspace	
  
	
  
-­‐  MongoDB	
  CerFfied	
  DBA	
  
What	
  is	
  sharding?	
  
-­‐  A	
  mechanism	
  for	
  horizontal	
  scaling	
  
	
  
-­‐  Distributes	
  the	
  dataset	
  over	
  mulFple	
  servers	
  
(shards)	
  
	
  
-­‐  Each	
  shard	
  is	
  an	
  independent	
  database	
  
	
  
-­‐  All	
  shards	
  consists	
  a	
  single	
  logical	
  database	
  
Why	
  Sharding?	
  
-­‐  Increases	
  cluster	
  throughput	
  –	
  Read/Write	
  
Scaling	
  
	
  
-­‐  Reduces	
  costs	
  -­‐	
  Many	
  small	
  servers	
  VS	
  one	
  big	
  
box	
  
-­‐  Eliminates	
  HW	
  and	
  SW	
  hard	
  limits	
  
MongoDB	
  Sharding	
  
-­‐  Consists	
  of	
  three	
  elements:	
  Shards,	
  Config	
  Servers	
  and	
  
Mongos	
  
	
  
-­‐  Shards:	
  Hold	
  the	
  cluster	
  data,	
  databases,	
  collecFons,	
  
documents	
  (Data	
  nodes)	
  
-­‐  Config	
  Servers:	
  Hold	
  the	
  cluster	
  metadata,	
  map	
  the	
  cluster	
  
architecture.	
  
-­‐  	
  Mongos:	
  Serve	
  all	
  drivers	
  requests.	
  Route	
  each	
  request	
  to	
  a	
  
shard	
  or	
  shards	
  (Router	
  nodes)	
  
ApplicaFon	
  /	
  Driver	
  Layer	
  	
  
Mongos01	
   Mongos02	
   MongosN	
  
ConfigSrv01	
  
ConfigSrv02	
  
ConfigSrv03	
  
Shard02	
   ShardN	
  
MongoDB	
  Sharded	
  Cluster	
  
Shard01	
   …	
  
…	
  
How	
  Sharding	
  works?	
  
-­‐  Range	
  parFFoning	
  per	
  collecFon	
  (chunks)	
  
-­‐  Shard	
  key	
  to	
  define	
  chunks	
  (field(s))	
  
-­‐  Chunks	
  are	
  “metadata”	
  on	
  the	
  config	
  servers	
  
-­‐  Chunks	
  can	
  move,	
  split	
  and	
  merge	
  
How	
  Sharding	
  works?	
  -­‐	
  Example	
  
{	
  "name"	
  :	
  "Angelina",	
  "surname"	
  :	
  "Jolie",	
  "posiFon"	
  :	
  "Windows	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Emma",	
  "surname"	
  :	
  "Stone",	
  "posiFon"	
  :	
  "Windows	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Charlize",	
  "surname"	
  :	
  "Theron",	
  "posiFon"	
  :	
  "Linux	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Olivia",	
  "surname"	
  :	
  "Wilde",	
  "posiFon"	
  :	
  "Linux	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Jessica",	
  "surname"	
  :	
  "Alba",	
  "posiFon"	
  :	
  "Sr	
  Linux	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Scarlef",	
  "surname"	
  :	
  "Johansson",	
  "posiFon"	
  :	
  "Sr	
  Windows	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Megan",	
  "surname"	
  :	
  "Fox",	
  "posiFon"	
  :	
  "Networks	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Mila",	
  "surname"	
  :	
  "Kunis",	
  "posiFon"	
  :	
  "Sr	
  Networks	
  Eng.",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Natalie",	
  "surname"	
  :	
  "Portman",	
  "posiFon"	
  :	
  "Database	
  Eng",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
{	
  "name"	
  :	
  "Anne",	
  "surname"	
  :	
  "Hathaway",	
  "posiFon"	
  :	
  "Sr	
  Database	
  Eng",	
  "phone"	
  :	
  "555-­‐5555"	
  }	
  
	
  
	
  
-­‐  CollecFon	
  employees	
  for	
  an	
  IT	
  company	
  
-­‐  Shard	
  key	
  “posi-on”	
  
How	
  Sharding	
  works?	
  -­‐	
  Example	
  
{	
  "min"	
  :	
  {	
  "posiFon"	
  :	
  {	
  "$minKey"	
  :	
  1	
  }	
  },	
  "max"	
  :	
  {	
  "posiFon"	
  :	
  "Database	
  Eng"	
  },	
  
"shard"	
  :	
  ”Shard01"	
  }	
  
	
  
{	
  "min"	
  :	
  {	
  "posiFon"	
  :	
  "Database	
  Eng"	
  },	
  "max"	
  :	
  {	
  "posiFon"	
  :	
  "Sr	
  Database	
  
Eng"	
  },	
  "shard"	
  :	
  "Shard01"	
  }	
  
	
  
{	
  "min"	
  :	
  {	
  "posiFon"	
  :	
  "Sr	
  Database	
  Eng"	
  },	
  "max"	
  :	
  {	
  "posiFon"	
  :	
  "Windows	
  
Eng."	
  },	
  "shard"	
  :	
  "Shard02"	
  }	
  
	
  
{	
  "min"	
  :	
  {	
  "posiFon"	
  :	
  "Windows	
  Eng."	
  },	
  "max"	
  :	
  {	
  "posiFon"	
  :	
  {	
  "$maxKey"	
  :	
  1	
  }	
  },	
  
"shard"	
  :	
  "Shard02"	
  }	
  
	
  
-­‐	
  Lower/upper	
  bound	
  and	
  shard	
  (server)	
  	
  	
  
	
  
Choose	
  a	
  shard	
  key	
  
-­‐  High	
  Cardinality	
  
-­‐  Not	
  Null	
  values	
  
-­‐  Immutable	
  field(s)	
  
	
  
-­‐  Not	
  Monotonically	
  increased	
  fields	
  
	
  
Choose	
  a	
  shard	
  key	
  
-­‐  Even	
  read/write	
  distribuFon	
  
-­‐  Even	
  data	
  distribuFon	
  
	
  
-­‐  Read	
  targeFng	
  
-­‐  Read	
  locality	
  
Choose	
  a	
  shard	
  key	
  
-­‐  Hashed	
  shard	
  keys	
  for	
  randomness	
  
	
  
-­‐  Compound	
  shard	
  keys	
  for	
  cardinality	
  
	
  
-­‐  Unique	
  indexes	
  are	
  good	
  	
  
-­‐  {_id:”hashed”}	
  scales	
  writes	
  
LimitaFons	
  of	
  Sharding	
  
-­‐  Unique	
  indexes	
  –	
  Just	
  one…	
  
-­‐  IniFal	
  collecFon	
  size	
  –	
  Avoid	
  collecFons	
  >	
  256G,	
  
hard	
  limit	
  is	
  a	
  funcFon	
  of	
  key	
  and	
  chunk	
  size	
  ,	
  
for	
  64MB	
  chunk/512B	
  key	
  is	
  more	
  than	
  1TB	
  
	
  
-­‐  Number	
  of	
  documents	
  per	
  chunk	
  	
  (250K)	
  	
  
LimitaFons	
  of	
  Sharding	
  
-­‐  Shard	
  key	
  size	
  <	
  512	
  bytes	
  
-­‐  MulFkey,text,	
  geo	
  indexes	
  are	
  prohibited	
  
-­‐  Some	
  operaFons	
  won’t	
  run	
  (for	
  example	
  group,	
  
db.eval(),	
  $isolated,	
  $snapshot,	
  geoSearch)	
  
“Sharding”	
  –	
  Other	
  players	
  
-­‐  ApplicaFon	
  level	
  sharding	
  
-­‐  Mysql	
  (MaxScale,	
  Fabric,…)	
  
	
  
-­‐  Postgres	
  (pg_shard)	
  
-­‐  ElasFcSearch	
  (Document	
  ID	
  or	
  rouFng)	
  
-­‐  Cassandra	
  (Hash-­‐based	
  -­‐	
  Ring	
  topology)	
  	
  
Contact	
  
www.objectrocket.com	
  
www.rackspace.co.uk/objectrocket/mongodb	
  
antonios.giannopoulos@rackspace.co.uk	
  
	
  
	
  
We	
  are	
  hiring!	
  (DevOps,	
  DBAs	
  and	
  more)	
  
hfp://objectrocket.com/careers	
  
QuesFons?	
  
	
  
Thank	
  you!!!	
  
	
  
MongoDB	
  Meetup	
  
What's	
  new	
  in	
  MongoDB	
  3.0	
  
	
  Tuesday,	
  November	
  10	
  ,	
  7:00	
  pm	
  
	
  @	
  Harokopio	
  University	
  
	
  

More Related Content

What's hot

MongoDB
MongoDBMongoDB
MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...
MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...
MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...
MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
MongoDB
 
9. Document Oriented Databases
9. Document Oriented Databases9. Document Oriented Databases
9. Document Oriented Databases
Fabio Fumarola
 
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
MongoDB
 
Sharding Methods for MongoDB
Sharding Methods for MongoDBSharding Methods for MongoDB
Sharding Methods for MongoDB
MongoDB
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
Habilelabs
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
valuebound
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
Abhijeet Vaikar
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
Lee Theobald
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Mike Dirolf
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
Harri Kauhanen
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
NodeXperts
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth
Fabio Fumarola
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
Rahul Jain
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
Heman Hosainpana
 
MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at Scale
MongoDB
 
Mongo DB
Mongo DB Mongo DB
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
neela madheswari
 

What's hot (20)

MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...
MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...
MongoDB San Francisco 2013: Hash-based Sharding in MongoDB 2.4 presented by B...
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
9. Document Oriented Databases
9. Document Oriented Databases9. Document Oriented Databases
9. Document Oriented Databases
 
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
 
Sharding Methods for MongoDB
Sharding Methods for MongoDBSharding Methods for MongoDB
Sharding Methods for MongoDB
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at Scale
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 

Viewers also liked

Webinar: Choosing the Right Shard Key for High Performance and Scale
Webinar: Choosing the Right Shard Key for High Performance and ScaleWebinar: Choosing the Right Shard Key for High Performance and Scale
Webinar: Choosing the Right Shard Key for High Performance and Scale
MongoDB
 
Choosing a Shard key
Choosing a Shard keyChoosing a Shard key
Choosing a Shard key
MongoDB
 
MongoDB for Time Series Data: Sharding
MongoDB for Time Series Data: ShardingMongoDB for Time Series Data: Sharding
MongoDB for Time Series Data: Sharding
MongoDB
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineers
Moshe Kaplan
 
Back to Basics Webinar 3: Introduction to Replica Sets
Back to Basics Webinar 3: Introduction to Replica SetsBack to Basics Webinar 3: Introduction to Replica Sets
Back to Basics Webinar 3: Introduction to Replica Sets
MongoDB
 
Back to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to ShardingBack to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to Sharding
MongoDB
 

Viewers also liked (6)

Webinar: Choosing the Right Shard Key for High Performance and Scale
Webinar: Choosing the Right Shard Key for High Performance and ScaleWebinar: Choosing the Right Shard Key for High Performance and Scale
Webinar: Choosing the Right Shard Key for High Performance and Scale
 
Choosing a Shard key
Choosing a Shard keyChoosing a Shard key
Choosing a Shard key
 
MongoDB for Time Series Data: Sharding
MongoDB for Time Series Data: ShardingMongoDB for Time Series Data: Sharding
MongoDB for Time Series Data: Sharding
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineers
 
Back to Basics Webinar 3: Introduction to Replica Sets
Back to Basics Webinar 3: Introduction to Replica SetsBack to Basics Webinar 3: Introduction to Replica Sets
Back to Basics Webinar 3: Introduction to Replica Sets
 
Back to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to ShardingBack to Basics 2017: Introduction to Sharding
Back to Basics 2017: Introduction to Sharding
 

Similar to MongoDB Sharding Fundamentals

2014 05-07-fr - add dev series - session 6 - deploying your application-2
2014 05-07-fr - add dev series - session 6 - deploying your application-22014 05-07-fr - add dev series - session 6 - deploying your application-2
2014 05-07-fr - add dev series - session 6 - deploying your application-2MongoDB
 
Spark Summit EU talk by Ross Lawley
Spark Summit EU talk by Ross LawleySpark Summit EU talk by Ross Lawley
Spark Summit EU talk by Ross Lawley
Spark Summit
 
How To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceHow To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own Datasource
MongoDB
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
Ben van Mol
 
20140614 introduction to spark-ben white
20140614 introduction to spark-ben white20140614 introduction to spark-ben white
20140614 introduction to spark-ben white
Data Con LA
 
Scaling with MongoDB
Scaling with MongoDBScaling with MongoDB
Scaling with MongoDB
Rick Copeland
 
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and Workshop
AhmedabadJavaMeetup
 
Spark Cassandra Connector Dataframes
Spark Cassandra Connector DataframesSpark Cassandra Connector Dataframes
Spark Cassandra Connector Dataframes
Russell Spitzer
 
Sharding
ShardingSharding
ShardingMongoDB
 
Scaling PyData Up and Out
Scaling PyData Up and OutScaling PyData Up and Out
Scaling PyData Up and Out
Travis Oliphant
 
DBVersity MongoDB Online Training Presentations
DBVersity MongoDB Online Training PresentationsDBVersity MongoDB Online Training Presentations
DBVersity MongoDB Online Training Presentations
Srinivas Mutyala
 
MongoDB for Time Series Data Part 3: Sharding
MongoDB for Time Series Data Part 3: ShardingMongoDB for Time Series Data Part 3: Sharding
MongoDB for Time Series Data Part 3: ShardingMongoDB
 
Dangling DNS records takeover at scale
Dangling DNS records takeover at scaleDangling DNS records takeover at scale
Dangling DNS records takeover at scale
Chandrapal Badshah
 
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasBerlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
MapR Technologies
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
Victoria Malaya
 
Cassandra Explained
Cassandra ExplainedCassandra Explained
Cassandra Explained
Eric Evans
 
Шардинг в MongoDB, Henrik Ingo (MongoDB)
Шардинг в MongoDB, Henrik Ingo (MongoDB)Шардинг в MongoDB, Henrik Ingo (MongoDB)
Шардинг в MongoDB, Henrik Ingo (MongoDB)
Ontico
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At CraigslistMySQLConference
 
Managing Your Content with Elasticsearch
Managing Your Content with ElasticsearchManaging Your Content with Elasticsearch
Managing Your Content with Elasticsearch
Samantha Quiñones
 

Similar to MongoDB Sharding Fundamentals (20)

2014 05-07-fr - add dev series - session 6 - deploying your application-2
2014 05-07-fr - add dev series - session 6 - deploying your application-22014 05-07-fr - add dev series - session 6 - deploying your application-2
2014 05-07-fr - add dev series - session 6 - deploying your application-2
 
Spark Summit EU talk by Ross Lawley
Spark Summit EU talk by Ross LawleySpark Summit EU talk by Ross Lawley
Spark Summit EU talk by Ross Lawley
 
How To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceHow To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own Datasource
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
 
20140614 introduction to spark-ben white
20140614 introduction to spark-ben white20140614 introduction to spark-ben white
20140614 introduction to spark-ben white
 
Scaling with MongoDB
Scaling with MongoDBScaling with MongoDB
Scaling with MongoDB
 
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and Workshop
 
Spark Cassandra Connector Dataframes
Spark Cassandra Connector DataframesSpark Cassandra Connector Dataframes
Spark Cassandra Connector Dataframes
 
Sharding
ShardingSharding
Sharding
 
Scaling PyData Up and Out
Scaling PyData Up and OutScaling PyData Up and Out
Scaling PyData Up and Out
 
DBVersity MongoDB Online Training Presentations
DBVersity MongoDB Online Training PresentationsDBVersity MongoDB Online Training Presentations
DBVersity MongoDB Online Training Presentations
 
MongoDB for Time Series Data Part 3: Sharding
MongoDB for Time Series Data Part 3: ShardingMongoDB for Time Series Data Part 3: Sharding
MongoDB for Time Series Data Part 3: Sharding
 
Dangling DNS records takeover at scale
Dangling DNS records takeover at scaleDangling DNS records takeover at scale
Dangling DNS records takeover at scale
 
Eyeing the Onion
Eyeing the OnionEyeing the Onion
Eyeing the Onion
 
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael HausenblasBerlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
 
Cassandra Explained
Cassandra ExplainedCassandra Explained
Cassandra Explained
 
Шардинг в MongoDB, Henrik Ingo (MongoDB)
Шардинг в MongoDB, Henrik Ingo (MongoDB)Шардинг в MongoDB, Henrik Ingo (MongoDB)
Шардинг в MongoDB, Henrik Ingo (MongoDB)
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At Craigslist
 
Managing Your Content with Elasticsearch
Managing Your Content with ElasticsearchManaging Your Content with Elasticsearch
Managing Your Content with Elasticsearch
 

More from Antonios Giannopoulos

Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Comparing Geospatial Implementation in MongoDB, Postgres, and ElasticComparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Antonios Giannopoulos
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best Practices
Antonios Giannopoulos
 
Sharding in MongoDB 4.2 #what_is_new
 Sharding in MongoDB 4.2 #what_is_new Sharding in MongoDB 4.2 #what_is_new
Sharding in MongoDB 4.2 #what_is_new
Antonios Giannopoulos
 
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
Antonios Giannopoulos
 
Managing data and operation distribution in MongoDB
Managing data and operation distribution in MongoDBManaging data and operation distribution in MongoDB
Managing data and operation distribution in MongoDB
Antonios Giannopoulos
 
Upgrading to MongoDB 4.0 from older versions
Upgrading to MongoDB 4.0 from older versionsUpgrading to MongoDB 4.0 from older versions
Upgrading to MongoDB 4.0 from older versions
Antonios Giannopoulos
 
How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018
Antonios Giannopoulos
 
Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018 Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018
Antonios Giannopoulos
 
Triggers in MongoDB
Triggers in MongoDBTriggers in MongoDB
Triggers in MongoDB
Antonios Giannopoulos
 
Sharded cluster tutorial
Sharded cluster tutorialSharded cluster tutorial
Sharded cluster tutorial
Antonios Giannopoulos
 
MongoDB – Sharded cluster tutorial - Percona Europe 2017
MongoDB – Sharded cluster tutorial - Percona Europe 2017MongoDB – Sharded cluster tutorial - Percona Europe 2017
MongoDB – Sharded cluster tutorial - Percona Europe 2017
Antonios Giannopoulos
 
Percona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialPercona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorial
Antonios Giannopoulos
 
How sitecore depends on mongo db for scalability and performance, and what it...
How sitecore depends on mongo db for scalability and performance, and what it...How sitecore depends on mongo db for scalability and performance, and what it...
How sitecore depends on mongo db for scalability and performance, and what it...
Antonios Giannopoulos
 
Antonios Giannopoulos Percona 2016 WiredTiger Configuration Variables
Antonios Giannopoulos Percona 2016 WiredTiger Configuration VariablesAntonios Giannopoulos Percona 2016 WiredTiger Configuration Variables
Antonios Giannopoulos Percona 2016 WiredTiger Configuration VariablesAntonios Giannopoulos
 
Introduction to Polyglot Persistence
Introduction to Polyglot Persistence Introduction to Polyglot Persistence
Introduction to Polyglot Persistence
Antonios Giannopoulos
 

More from Antonios Giannopoulos (15)

Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Comparing Geospatial Implementation in MongoDB, Postgres, and ElasticComparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best Practices
 
Sharding in MongoDB 4.2 #what_is_new
 Sharding in MongoDB 4.2 #what_is_new Sharding in MongoDB 4.2 #what_is_new
Sharding in MongoDB 4.2 #what_is_new
 
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
 
Managing data and operation distribution in MongoDB
Managing data and operation distribution in MongoDBManaging data and operation distribution in MongoDB
Managing data and operation distribution in MongoDB
 
Upgrading to MongoDB 4.0 from older versions
Upgrading to MongoDB 4.0 from older versionsUpgrading to MongoDB 4.0 from older versions
Upgrading to MongoDB 4.0 from older versions
 
How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018How to upgrade to MongoDB 4.0 - Percona Europe 2018
How to upgrade to MongoDB 4.0 - Percona Europe 2018
 
Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018 Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018
 
Triggers in MongoDB
Triggers in MongoDBTriggers in MongoDB
Triggers in MongoDB
 
Sharded cluster tutorial
Sharded cluster tutorialSharded cluster tutorial
Sharded cluster tutorial
 
MongoDB – Sharded cluster tutorial - Percona Europe 2017
MongoDB – Sharded cluster tutorial - Percona Europe 2017MongoDB – Sharded cluster tutorial - Percona Europe 2017
MongoDB – Sharded cluster tutorial - Percona Europe 2017
 
Percona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialPercona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorial
 
How sitecore depends on mongo db for scalability and performance, and what it...
How sitecore depends on mongo db for scalability and performance, and what it...How sitecore depends on mongo db for scalability and performance, and what it...
How sitecore depends on mongo db for scalability and performance, and what it...
 
Antonios Giannopoulos Percona 2016 WiredTiger Configuration Variables
Antonios Giannopoulos Percona 2016 WiredTiger Configuration VariablesAntonios Giannopoulos Percona 2016 WiredTiger Configuration Variables
Antonios Giannopoulos Percona 2016 WiredTiger Configuration Variables
 
Introduction to Polyglot Persistence
Introduction to Polyglot Persistence Introduction to Polyglot Persistence
Introduction to Polyglot Persistence
 

Recently uploaded

06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 

Recently uploaded (20)

06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 

MongoDB Sharding Fundamentals

  • 1. MongoDB  Sharding   fundamentals   Antonios  Giannopoulos     Database  Administrator  at   ObjectRocket  by  Rackspace  
  • 2. Background   -­‐  14  years  in  databases  and  system  engineering   -­‐  NoSQL  DBA  @  ObjectRocket  by  Rackspace     -­‐  MongoDB  CerFfied  DBA  
  • 3. What  is  sharding?   -­‐  A  mechanism  for  horizontal  scaling     -­‐  Distributes  the  dataset  over  mulFple  servers   (shards)     -­‐  Each  shard  is  an  independent  database     -­‐  All  shards  consists  a  single  logical  database  
  • 4. Why  Sharding?   -­‐  Increases  cluster  throughput  –  Read/Write   Scaling     -­‐  Reduces  costs  -­‐  Many  small  servers  VS  one  big   box   -­‐  Eliminates  HW  and  SW  hard  limits  
  • 5. MongoDB  Sharding   -­‐  Consists  of  three  elements:  Shards,  Config  Servers  and   Mongos     -­‐  Shards:  Hold  the  cluster  data,  databases,  collecFons,   documents  (Data  nodes)   -­‐  Config  Servers:  Hold  the  cluster  metadata,  map  the  cluster   architecture.   -­‐   Mongos:  Serve  all  drivers  requests.  Route  each  request  to  a   shard  or  shards  (Router  nodes)  
  • 6. ApplicaFon  /  Driver  Layer     Mongos01   Mongos02   MongosN   ConfigSrv01   ConfigSrv02   ConfigSrv03   Shard02   ShardN   MongoDB  Sharded  Cluster   Shard01   …   …  
  • 7. How  Sharding  works?   -­‐  Range  parFFoning  per  collecFon  (chunks)   -­‐  Shard  key  to  define  chunks  (field(s))   -­‐  Chunks  are  “metadata”  on  the  config  servers   -­‐  Chunks  can  move,  split  and  merge  
  • 8. How  Sharding  works?  -­‐  Example   {  "name"  :  "Angelina",  "surname"  :  "Jolie",  "posiFon"  :  "Windows  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Emma",  "surname"  :  "Stone",  "posiFon"  :  "Windows  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Charlize",  "surname"  :  "Theron",  "posiFon"  :  "Linux  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Olivia",  "surname"  :  "Wilde",  "posiFon"  :  "Linux  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Jessica",  "surname"  :  "Alba",  "posiFon"  :  "Sr  Linux  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Scarlef",  "surname"  :  "Johansson",  "posiFon"  :  "Sr  Windows  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Megan",  "surname"  :  "Fox",  "posiFon"  :  "Networks  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Mila",  "surname"  :  "Kunis",  "posiFon"  :  "Sr  Networks  Eng.",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Natalie",  "surname"  :  "Portman",  "posiFon"  :  "Database  Eng",  "phone"  :  "555-­‐5555"  }   {  "name"  :  "Anne",  "surname"  :  "Hathaway",  "posiFon"  :  "Sr  Database  Eng",  "phone"  :  "555-­‐5555"  }       -­‐  CollecFon  employees  for  an  IT  company   -­‐  Shard  key  “posi-on”  
  • 9. How  Sharding  works?  -­‐  Example   {  "min"  :  {  "posiFon"  :  {  "$minKey"  :  1  }  },  "max"  :  {  "posiFon"  :  "Database  Eng"  },   "shard"  :  ”Shard01"  }     {  "min"  :  {  "posiFon"  :  "Database  Eng"  },  "max"  :  {  "posiFon"  :  "Sr  Database   Eng"  },  "shard"  :  "Shard01"  }     {  "min"  :  {  "posiFon"  :  "Sr  Database  Eng"  },  "max"  :  {  "posiFon"  :  "Windows   Eng."  },  "shard"  :  "Shard02"  }     {  "min"  :  {  "posiFon"  :  "Windows  Eng."  },  "max"  :  {  "posiFon"  :  {  "$maxKey"  :  1  }  },   "shard"  :  "Shard02"  }     -­‐  Lower/upper  bound  and  shard  (server)        
  • 10. Choose  a  shard  key   -­‐  High  Cardinality   -­‐  Not  Null  values   -­‐  Immutable  field(s)     -­‐  Not  Monotonically  increased  fields    
  • 11. Choose  a  shard  key   -­‐  Even  read/write  distribuFon   -­‐  Even  data  distribuFon     -­‐  Read  targeFng   -­‐  Read  locality  
  • 12. Choose  a  shard  key   -­‐  Hashed  shard  keys  for  randomness     -­‐  Compound  shard  keys  for  cardinality     -­‐  Unique  indexes  are  good     -­‐  {_id:”hashed”}  scales  writes  
  • 13. LimitaFons  of  Sharding   -­‐  Unique  indexes  –  Just  one…   -­‐  IniFal  collecFon  size  –  Avoid  collecFons  >  256G,   hard  limit  is  a  funcFon  of  key  and  chunk  size  ,   for  64MB  chunk/512B  key  is  more  than  1TB     -­‐  Number  of  documents  per  chunk    (250K)    
  • 14. LimitaFons  of  Sharding   -­‐  Shard  key  size  <  512  bytes   -­‐  MulFkey,text,  geo  indexes  are  prohibited   -­‐  Some  operaFons  won’t  run  (for  example  group,   db.eval(),  $isolated,  $snapshot,  geoSearch)  
  • 15. “Sharding”  –  Other  players   -­‐  ApplicaFon  level  sharding   -­‐  Mysql  (MaxScale,  Fabric,…)     -­‐  Postgres  (pg_shard)   -­‐  ElasFcSearch  (Document  ID  or  rouFng)   -­‐  Cassandra  (Hash-­‐based  -­‐  Ring  topology)    
  • 16. Contact   www.objectrocket.com   www.rackspace.co.uk/objectrocket/mongodb   antonios.giannopoulos@rackspace.co.uk       We  are  hiring!  (DevOps,  DBAs  and  more)   hfp://objectrocket.com/careers  
  • 17. QuesFons?     Thank  you!!!     MongoDB  Meetup   What's  new  in  MongoDB  3.0    Tuesday,  November  10  ,  7:00  pm    @  Harokopio  University