Couchbase Server 2.0 andCross Data Center replication                Dipti Borkar                                1
XDCR: Cross Data Center Replication                          EUROPE DATA       US DATA              CENTER       CENTER   ...
Cross Data Center Replication – The basics• Replicate your Couchbase data across clusters• Clusters may be spread across g...
Intra-cluster Replication                            4
Cross Datacenter Replication (XDCR)                                      5
Single node - Couchbase Write Operation with XDCR                                                   2                     ...
Internal Data Flow                     1. Document written to                        managed cache                     2. ...
XDCR in action            SERVER 1                 SERVER 2                            SERVER 3                           ...
XDCR ARCHITECTURE                    9
Bucket-level XDCR         Cluster 1   Cluster 2         Bucket A    Bucket A         Bucket B    Bucket B         Bucket C...
Continuous Reliable Replication• All data mutations replicated to destination cluster• Multiple streams round-robin across...
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      ...
Active-Active Conflict Resolution• Couchbase Server provides strong consistency at the  document level within a cluster• X...
CONFIGURATION     AND MONITORING                15
STEP 1: Define Remote Cluster                                16
STEP 2: Start Replication                            17
Monitor Ongoing Replications                               18
Detailed Replication Progress• Source Cluster• Destination Cluster                                19
XDCR TOPOLOGIES                  20
Unidirectional• Hot spare• Read slave• Development/Testing copies                               21
Bidirectional• Multiple Active Masters• Disaster Recovery• Datacenter Locality                            22
Chain        23
Propagation              24
XDCR in the Cloud• Server Naming   – Optimal configuration using DNS name that resolves to     internal address for intra-...
USE CASES            26
Data Locality• Data closer to your users is faster for your users                                                       27
Disaster Recovery• Ensure 24x7x365 data availability even if an entire data  center goes down                             ...
Development and Testing• Test code changes with actual production data without  interrupting your production cluster• Give...
Impact of XDCR on the clusterYour clusters need to be sized for XDCR• XDCR is CPU intensive   – Configure the number of pa...
Additional Resources• Couchbase Server Manual -  http://www.couchbase.com/docs/couchbase-manual-  2.0/couchbase-admin-task...
Q&A      32
THANK YOU      @DBORKARDIPTI@COUCHBASE.COM                      33
Upcoming SlideShare
Loading in …5
×

Couchbase Server 2.0 - XDCR - Deep dive

1,300 views

Published on

Deep dive presentation on Cross data center replication - new to Couchbase Server 2.0

  • Be the first to comment

Couchbase Server 2.0 - XDCR - Deep dive

  1. 1. Couchbase Server 2.0 andCross Data Center replication Dipti Borkar 1
  2. 2. XDCR: Cross Data Center Replication EUROPE DATA US DATA CENTER CENTER ASIA DATA CENTER http://blog.groosy.com/wp-content/uploads/2011/10/internet-map.jpg 2
  3. 3. Cross Data Center 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 3
  4. 4. Intra-cluster Replication 4
  5. 5. Cross Datacenter Replication (XDCR) 5
  6. 6. Single node - Couchbase Write Operation with XDCR 2 Doc 1 App Server Couchbase Server Node 3 2 3 Managed Cache To other node Replication Doc 1 Queue Disk Queue Disk Doc 1 XDCR Queue To other cluster 6
  7. 7. 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 7
  8. 8. XDCR in action SERVER 1 SERVER 2 SERVER 3 COUCHBASE SERVER CLUSTER ACTIVE ACTIVE ACTIVE NYC DATA CENTER Doc Doc Doc Doc 2 Doc Doc Doc 9 Doc Doc RAM RAM RAM Doc Doc Doc Doc Doc Doc Doc Doc Doc DISK DISK DISK SERVER 1 SERVER 2 SERVER 3 ACTIVE ACTIVE ACTIVE Doc Doc Doc Doc 2 Doc Doc Doc 9 Doc Doc RAM RAM RAM Doc Doc Doc Doc Doc Doc Doc Doc DocCOUCHBASE SERVER CLUSTER SF DATA CENTER DISK DISK DISK 8
  9. 9. XDCR ARCHITECTURE 9
  10. 10. Bucket-level XDCR Cluster 1 Cluster 2 Bucket A Bucket A Bucket B Bucket B Bucket C Bucket C 10
  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 11
  12. 12. Cluster Topology Aware• Automatically handles node addition and removal in source and destination clusters 12
  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 13
  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 3 5 14
  15. 15. CONFIGURATION AND MONITORING 15
  16. 16. STEP 1: Define Remote Cluster 16
  17. 17. STEP 2: Start Replication 17
  18. 18. Monitor Ongoing Replications 18
  19. 19. Detailed Replication Progress• Source Cluster• Destination Cluster 19
  20. 20. XDCR TOPOLOGIES 20
  21. 21. Unidirectional• Hot spare• Read slave• Development/Testing copies 21
  22. 22. Bidirectional• Multiple Active Masters• Disaster Recovery• Datacenter Locality 22
  23. 23. Chain 23
  24. 24. Propagation 24
  25. 25. 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 25
  26. 26. USE CASES 26
  27. 27. Data Locality• Data closer to your users is faster for your users 27
  28. 28. Disaster Recovery• Ensure 24x7x365 data availability even if an entire data center goes down 28
  29. 29. Development and Testing• Test code changes with actual production data without interrupting your production cluster• Give developers local databases with real data, easy to dispose and recreate Test and Dev Staging Production 29
  30. 30. Impact of XDCR on the clusterYour 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 30
  31. 31. Additional Resources• Couchbase Server Manual - http://www.couchbase.com/docs/couchbase-manual- 2.0/couchbase-admin-tasks-xdcr.html• Getting Started with XDCR blog - http://blog.couchbase.com/cross-data-center- replication-step-step-guide-amazon-aws 31
  32. 32. Q&A 32
  33. 33. THANK YOU @DBORKARDIPTI@COUCHBASE.COM 33

×