Couchbase Server and
Cross Datacenter Replication
Anil Kumar
Technical Product Manager
XDCR: Cross Datacenter Replication
US DATA
CENTER
EUROPE DATA
CENTER
ASIA DATA
CENTER
http://blog.groosy.com/wp-content/up...
Cross Datacenter Replication
– The basics
• Replicate your Couchbase data across clusters
• Clusters may be spread across ...
Intra-cluster Replication
Cross Datacenter Replication (XDCR)
XDCR Architecture
33 2
Single node - Couchbase Write
Operation with XDCR
Managed Cache
DiskQueue
Disk
Replication
Queue
App Server
Couchbase...
Internal Data Flow
1. Document written to
managed cache
2. Document added to
intra-cluster replication
queue
3. Document a...
XDCR in action
COUCHBASE SERVER CLUSTER
NYC DATA CENTERACTIVE
Doc
Doc 2
SERVER 1
Doc 9
SERVER 2 SERVER 3
RAM
Doc Doc Doc
A...
Bucket-level XDCR
Bucket A
Bucket B
Bucket C
Cluster 1
Bucket A
Bucket B
Bucket C
Cluster 2
Continuous Reliable Replication
• All data mutations replicated to destination cluster
• Multiple streams round-robin acro...
Cluster Topology Aware
• Automatically handles node addition and removal in source
and destination clusters
Efficient
• Couchbase Server de-duplicates writes to disk
- With multiple updates to the same document only the last versi...
Active-Active Conflict Resolution
• Couchbase Server provides strong consistency at the
document level within a cluster
• ...
Configuration and
Monitoring
STEP 1: Define Remote Cluster
STEP 2: Start Replication
Monitor Ongoing Replications
Detailed Replication Progress
• Source Cluster
• Destination Cluster
XDCR Topologies and Use Case
Unidirectional
• Hot spare / Disaster Recovery
• Development/Testing copies
Bidirectional
• Multiple Active Masters
• Disaster Recovery
• Datacenter Locality
Chain
Data aggregation
Data propagation
XDCR in the Cloud
• Server Naming
- Optimal configuration using DNS name that resolves to internal address
for intra-clust...
Impact of XDCR on the cluster
Your clusters need to be sized for XDCR
• XDCR is CPU intensive
- Configure the number of pa...
Q & A
Coming September 13
Featured speakers include:
http://www.couchbase.com/couchbase-sf-2013
Thank you
@ANILKUMAR1129
ANIL@COUCHBASE.COM
Get Couchbase Server from http://www.couchbase.com/download
Upcoming SlideShare
Loading in...5
×

Webinar - Using Cross Datacenter Replication for Disaster Recovery and Data Locality

983

Published on

Couchbase has the ability to replicate your data across datacenters, offering a truly high-performance experience to a worldwide audience. Replication also provides resilience in the face of infrastructure failures.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
983
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Review Existing Couchbase Server Replication
  • 1.  A set request comes in from the application .2.  Couchbase Server responses back that they key is written3. Couchbase Server then Replicates the data out to memory in the other nodes4. At the same time it is put the data into a write que to be persisted to disk
  • Move data close to usersRead and write data in any datacenterMultiple locations for disaster recoveryIndependently managed clusters serving same data
  • XDCR replications are configured on the bucket level within your clusterAs shown here, bucket A is configured to not be replicated at allBucket B is configured with uni-directional replication, from cluster 1 to cluster 2Changes made in bucket b on cluster 1 will be propagated to cluster 2, however changes made to bucket b on cluster 2 will NOT be propagated back to cluster 1Bucket C is configured with bi-directional replication between clusters 1 and 2Changes made in either cluster will be propagated to the otherBucket level configuration gives you flexibility to customize the behavior for your specific use case
  • Topology changes on both sides of the XDCR replication are supported
  • Webinar - Using Cross Datacenter Replication for Disaster Recovery and Data Locality

    1. 1. Couchbase Server and Cross Datacenter Replication Anil Kumar Technical Product Manager
    2. 2. XDCR: Cross Datacenter Replication US DATA CENTER EUROPE DATA CENTER ASIA DATA CENTER http://blog.groosy.com/wp-content/uploads/2011/10/internet-map.jpg
    3. 3. Cross Datacenter Replication – The basics • Replicate your Couchbase data across clusters • Clusters may be spread across geos • Configured on a per-bucket basis • Supports unidirectional and bidirectional operation • Application can read and write from both clusters (active – active replication) • Replication throughput scales out linearly • Different from intra-cluster replication
    4. 4. Intra-cluster Replication
    5. 5. Cross Datacenter Replication (XDCR)
    6. 6. XDCR Architecture
    7. 7. 33 2 Single node - Couchbase Write Operation with XDCR Managed Cache DiskQueue Disk Replication Queue App Server Couchbase Server Node Doc 1Doc 1 Doc 1 To other node XDCR Engine Doc 1 To other cluster
    8. 8. Internal Data Flow 1. Document written to managed cache 2. Document added to intra-cluster replication queue 3. Document added to disk queue 4. XDCR push replicates to other clusters
    9. 9. XDCR in action COUCHBASE SERVER CLUSTER NYC DATA CENTERACTIVE Doc Doc 2 SERVER 1 Doc 9 SERVER 2 SERVER 3 RAM Doc Doc Doc ACTIVE Doc Doc Doc RAM ACTIVE Doc Doc Doc RAM DISK Doc Doc Doc DISK Doc Doc Doc DISK COUCHBASE SERVER CLUSTER SF DATA CENTER ACTIVE Doc Doc 2 SERVER 1 Doc 9 SERVER 2 SERVER 3 RAM Doc Doc Doc ACTIVE Doc Doc Doc RAM ACTIVE Doc Doc Doc RAM DISK Doc Doc Doc DISK Doc Doc Doc DISK
    10. 10. Bucket-level XDCR Bucket A Bucket B Bucket C Cluster 1 Bucket A Bucket B Bucket C Cluster 2
    11. 11. Continuous Reliable Replication • All data mutations replicated to destination cluster • Multiple streams round-robin across vBuckets in parallel (32 default) • Automatic resume after network disruption
    12. 12. Cluster Topology Aware • Automatically handles node addition and removal in source and destination clusters
    13. 13. Efficient • Couchbase Server de-duplicates writes to disk - With multiple updates to the same document only the last version is written to disk - Only this last change written to disk is passed to XDCR • Document revisions are compared between clusters prior to transfer
    14. 14. Active-Active Conflict Resolution • Couchbase Server provides strong consistency at the document level within a cluster • XDCR provides eventual consistency across clusters • If a document is mutated on both clusters, both clusters will pick the same “winner” • In case of conflict, document with the most updates will be considered the “winner” { … } 3 3 { … } Doc 1 on DC1 Doc 1 on DC2 Winner
    15. 15. Configuration and Monitoring
    16. 16. STEP 1: Define Remote Cluster
    17. 17. STEP 2: Start Replication
    18. 18. Monitor Ongoing Replications
    19. 19. Detailed Replication Progress • Source Cluster • Destination Cluster
    20. 20. XDCR Topologies and Use Case
    21. 21. Unidirectional • Hot spare / Disaster Recovery • Development/Testing copies
    22. 22. Bidirectional • Multiple Active Masters • Disaster Recovery • Datacenter Locality
    23. 23. Chain
    24. 24. Data aggregation
    25. 25. Data propagation
    26. 26. XDCR in the Cloud • Server Naming - Optimal configuration using DNS name that resolves to internal address for intra-cluster communication and public address for inter-cluster communication • Security - XDCR traffic is not encrypted, plan topology accordingly - Consider 3rd party Amazon VPN solutions
    27. 27. Impact of XDCR on the cluster Your clusters need to be sized for XDCR • XDCR is CPU intensive - Configure the number of parallel streams based on your CPU capacity • You are doubling your I/O usage - I/O capacity needs to be sized correctly • You will need more memory particularly for bidirectional XDCR - Memory capacity needs to be sized correctly
    28. 28. Q & A
    29. 29. Coming September 13 Featured speakers include: http://www.couchbase.com/couchbase-sf-2013
    30. 30. Thank you @ANILKUMAR1129 ANIL@COUCHBASE.COM Get Couchbase Server from http://www.couchbase.com/download
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×