• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Multi Data Center Strategies
 

Multi Data Center Strategies

on

  • 5,682 views

Strategies for multi-data center deployment. Diving into the details of deploying of MongoDB across multiple data centers. ...

Strategies for multi-data center deployment. Diving into the details of deploying of MongoDB across multiple data centers.

Covers the advantages of a multi data center deployment for read/write locality, the various deployment strategies, and disaster preparedness and recovery.

In addition, we’ll look at the MongoDB roadmap and planned enhancements around data center awareness.


This presentation was given at MongoNYC 2012. The animations didn’t survive the transformation to the web, so not all the meaning carries over perfectly.

Statistics

Views

Total Views
5,682
Views on SlideShare
3,796
Embed Views
1,886

Actions

Likes
5
Downloads
98
Comments
0

14 Embeds 1,886

http://architects.dzone.com 843
http://understeer.hatenablog.com 562
http://spf13.com 366
http://lanyrd.com 52
http://feeds.feedburner.com 36
http://localhost 7
http://www.tuicool.com 7
http://webcache.googleusercontent.com 6
http://cloud.feedly.com 2
http://10.237.125.73 1
http://10.224.64.62 1
https://si0.twimg.com 1
http://www.dzone.com 1
http://www.linkedin.com 1
More...

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Multi Data Center Strategies Multi Data Center Strategies Presentation Transcript

  • Data CenterAwareness
  • @spf13 AKASteve Francia15+ years buildingthe internet Father, husband, skateboarderChief Solutions Architect @responsible for drivers,integrations, web & docs
  • IntroductionThe most importantfeature ever...When you need it
  • MultipleData CentersLet’s describe our scenario
  • We will BuildA Social Network
  • A Global Social NetworkFor simplicity.. let’s focus on 3 locations
  • ChallengesData ConsistencyMaintain good userexperienceScaling
  • Single Database location DB
  • Single Database location DB Fast Slo
  • Single Write location Write DB Read DB Read DB
  • Single Write location Write DB Read DB Read DB
  • Single Write location Write DB Read DB Read DB
  • Single Write location Write DB Read DB Read DB
  • We Need MoreData is localized (for themost part)Users interact local toregion (mostly)
  • GoalsRoute data locallyMinimize global failuresRemote data low latencyMinimize remote dataaccess
  • MongoDB
  • Local WriteWrite DB Read DB ReplicaDB Read Set
  • Local Write Write DB Read DB Read DB Replica Set
  • 3 locations 3 Replica SetsWrite DB Write DB Write DB Read DB Read DB Read DB Read DB Read DB Read DBReplica Set Replica Set Replica Set
  • 3 locations 3 Replica SetsWrite DB Write DB Write DB Read DB Read DB Read DB Read DB Read DB Read DBReplica Set Replica Set Replica Set
  • 3 locations 3 Replica Sets Read DB Write DB Read DBWrite DB Read DB Read DB Replica Set Replica Set Replica Set Read DB Read DB Write DB
  • 3 locations 3 Replica Sets Read DB Write DB Read DBWrite DB Read DB Read DB Replica Set Replica Set Replica Set Read DB Read DB Write DB
  • 3 locations 3 Replica Sets Read DB Write DB Read DBWrite DB Read DB Read DB Replica Set Replica Set Replica Set Read DB Read DB Write DB
  • 3 locations 3 Replica Sets Read DB Write DB Read DBWrite DB Read DB Read DB Replica Set Replica Set Replica Set Read DB Read DB Write DB
  • Local WritesLocal REads (w/delays) Write DB Write DB Read DB Read DB Read DB Read DB Write DB Read DB Read DB
  • Local WritesLocal REads (w/delays) Write DB Write DB Read DB Read DB Read DB Read DB Write DB Read DB Read DB
  • Local WritesLocal REads (w/delays) Write DB Write DB Read DB Read DB Read DB Read DB Write DB Read DB Read DB
  • Local WritesLocal REads (w/delays) Write DB Write DB Read DB Read DB Read DB Read DB Write DB Read DB Read DB
  • Write Concern
  • Write Concern &If a write requires areturn tripWhat the return trip shoulddepend on
  • Write Concernw:the number of servers to replicate to.wtimeout:timeout in ms waiting for replication.j:wait for journal synctags:ensure replication to certain tagged nodes
  • Write ConcernMongo mongo = new Mongo( new MongoURI("mongodb://127.0.0.1:27017,127.0.0.1:27018"));mongo.setWriteConcern( new WriteConcern(2, 1000));
  • Write ConcernMongo mongo = new Mongo( new MongoURI("mongodb://127.0.0.1:27017,127.0.0.1:27018"));DBCollection users =mongo.getDB(“myapp”).getCollection(“users”);users.insert( new DBObject("name", "Kyle"), new WriteConcern(2, 1000))
  • GoalsRoute data locallyMinimize global failuresRemote data low latencyMinimize remote dataaccess
  • GoalsRoute data locallyMinimize global failuresRemote data low latencyMinimize remote dataaccess
  • GoalsRoute data locallyMinimize global failuresRemote data low latencyMinimize remote dataaccess
  • GoalsRoute data locallyMinimize global failuresRemote data low latencyMinimize remote dataaccess
  • GoalsRoute data locallyMinimize global failuresRemote data low latencyMinimize remote dataaccess
  • IssuesDoesn’t work withShardingCan’t control which nodeto read fromApp needs to be aware(at some level)
  • MongoDB
  • Upcoming FeaturesGeoAware ShardingRead Preferences
  • Geo-Aware shardingAdding second dimensionto shard keySecond range can beused for locality awaresharding
  • Read Preferences Read from: Primary Secondary Primary Only Secondary Only Nearestsecondary queryingrouted to specific tags
  • Scenarios
  • Scenarios1. Social Network2. Analysis3. Establishing Auth Key4. Administration
  • Social Network Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Social Network Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Social Network Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Social Network Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Analysis Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Analysis Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Analysis Write DB Write DB Read DBRead DB Read DBRead DB Write DB ReadPref : Read DB Read DB PrimaryOnly
  • Analysis Write DB Write DB Read DBRead DB Read DBRead DB Write DB ReadPref : Read DB Read DB PrimaryOnly
  • Auth Keys Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Auth Keys Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Auth Keys Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Auth Keys Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB WriteConcern w : all
  • Auth Keys Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB WriteConcern w : all
  • Administration Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Administration Write DB Write DB Read DBRead DB Read DBRead DB Write DB Read DB Read DB
  • Administration Write DB Write DB Read DBRead DB Read DBRead DB Write DB ReadPref : Read DB Read DB PrimaryOnly
  • Administration Write DB Write DB Read DBRead DB Read DBRead DB Write DB ReadPref : Read DB Read DB PrimaryOnly WriteConcern w : all
  • Administration Write DB Write DB Read DBRead DB Read DBRead DB Write DB ReadPref : Read DB Read DB PrimaryOnly WriteConcern w : all
  • Administration Write DB Write DB Read DBRead DB Read DBRead DB Write DB ReadPref : Read DB Read DB PrimaryOnly WriteConcern w : all
  • ConclusionMongoDBOpen source enterprisefeatures for when youneed them
  • http://spf13.com http://github.com/s @spf13Questions? download at mongodb.org We’re hiring!! Contact us at jobs@10gen.com