MongoDB Datacenter Awareness (mongosf2012)
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

MongoDB Datacenter Awareness (mongosf2012)

on

  • 4,395 views

Datacenter awareness in general and specifically with mongodb 2.0 and 2.2

Datacenter awareness in general and specifically with mongodb 2.0 and 2.2

Statistics

Views

Total Views
4,395
Views on SlideShare
4,395
Embed Views
0

Actions

Likes
1
Downloads
22
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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

MongoDB Datacenter Awareness (mongosf2012) Presentation Transcript

  • 1. Data Center Awareness Scott Hernandez, 10gen
  • 2. Agenda● Infrastructure● Players and moving pieces● Goals and challenges● MongoDB solutions ○ Now (Replication, Sharding, Tagging) ○ Future (+=, Shard affinity, more Tagging)
  • 3. Multiple Online Data Centers● Europe ● USA ○ App ○ App ○ Data ○ Data● Asia ○ App
  • 4. Infrastructure● Geographically disparate clients● Geo-DNS/Load Balancer (LB)● Accelerators/Reverse-Proxies● Server/Application
  • 5. Players Introduction● Users● Data Centers ○ Application Servers ○ Databases● Application Awareness ○ Configuration ○ Why?
  • 6. Goals● Reduce network ○ latency ○ Inter-dc traffic● Localize resource use ○ Reduce failure cases ○ Increase availability ○ Isolate dependencies● Provide multiple active sites● Partition geo/regional data
  • 7. Challenges● Data concistency ○ User experience ○ Backup and operational needs● Scaling● Partitioning/Sharding
  • 8. Multiple Online Data Centers● Europe ● USA ○ App ○ App ○ Data ○ Data● Asia ○ App
  • 9. Non-default behaviorsDefault: Multi-DC needs:● Primary read/write ● Read locally● No stale reads ● Support some stale reads
  • 10. Replication● Replica Sets ○ Possible to read from non-primary replicas ○ Copy of data ○ Write Concern ■ Tagging ■ Verifiable writes● Provides ○ Isolation (possible stale reads) ○ Availability ○ Distribution of read, possibly stale (WriteConcern)
  • 11. Replica WritesClient Write Replica_Safe USA-NY Ack USA-CA Query EUROPE Client
  • 12. Tagged WritesUses● Multiple Racks/DCs● Backups● Disaster Recovery
  • 13. Sharding + Replication● Range-based sharding (chunks) ○ Not tag aware ○ Random distribution (balancer)● Shards made up of Replica Sets ○ All advantages● Writes to (primary) shard per chunk● Reads ○ From Primary by default ○ Optional non-primary reads
  • 14. New Features● ReadPreference ○ Primary (only) ○ Secondary (preferred) ○ PrimaryFirst? ○ SecondayOnly? ○ Any (closest)● Replica Sets ○ ReadPreference● Sharding ○ Tagged balancing ○ ReadPreference
  • 15. Sharding - Reads● Local when non-primary● Tagged ○ Custom Tagging ○ By region/dc/rack?
  • 16. Sharding - Balancing/Distribution● Tag chunks/ranges● Possible super-chunks (grouping)