webinar - couchbase server 2.0 and cross datacenter replication
DESCRIPTION
Couchbase 2.0 has the ability to replicate your data across data centers, offering a truly high-performance experience to a worldwide audience. Replication also provides resilience in the face of infrastructure failures.TRANSCRIPT
Featured speakers include:
As a thanks for attending this webinar, get 10% off. Use discount code WEBINAR.http://www.couchbase.com/couchbase-london
Couchbase Server 2.0 and Cross Datacenter Replication
(XDCR)
Alex Ma
Senior Systems Engineer, Couchbase
• Leading NoSQL database project focused on distributed database technology and surrounding ecosystem
• Supports both key-value and document-oriented use cases
• All components are available under the Apache 2.0 Public License
• Obtained as packaged software in both enterprise and community editions.
Couchbase Open Source Project
Couchbase Open Source Project
Easy Scalability
Consistent High Performance
Always On
24x365
Grow cluster without application changes, without downtime with a single click
Consistent sub-millisecond read and write response times
with consistent high throughput
No downtime for software upgrades, hardware maintenance, etc.
JSONJSONJSON
JSONJSON
PERFORMANCE
Flexible Data Model
JSON document model with no fixed schema.
Couchbase Server
Flexible Data Model
• No need to worry about the database when changing your application
• Records can have different structures, there is no fixed schema
• Allows painless data model changes for rapid application development
{ “ID”: 1, “FIRST”: “Dipti”, “LAST”: “Borkar”, “ZIP”: “94040”, “CITY”: “MV”, “STATE”: “CA”}
JSONJSON
JSON JSON
New in 2.0
JSON support Indexing and Querying
Cross datacenter replicationIncremental Map Reduce
JSONJSONJSON
JSONJSON
Market Adoption – CustomersInternet Companies Enterprises
• Replicates data between Couchbase clusters
• Clusters can be in geographically different locations
• Allows for: – Offline work cluster– Active Backup– Geographically local data for better performance
• Configured on a per-bucket basis
• Unidirectional and bidirectional support
• Bidirectional allows active/active replication
• Scales out linearly
Cross Datacenter Replication (XDCR)
XDCR Use Case: Unidirectional
• Hot spares (active backup)
• Development/testing
• Offline analysis/processing
XDCR Use Case: Bidirectional
•Multiple clusters for distributing workload
• Cluster for client update/operations
• Cluster for company updates/operations
XDCR Use Case: Multiple
• Geographically Local Clusters
• Clusters must use the same platform
• Clusters may be different sizes/configurations
• XDCR is driven by the source cluster– Sending cluster is responsible for determining documents to replicate
• XDCR replicates after document written to disk
•Multiple document changes are combined to reduce network bandwidth
• Design documents/view definitions are not replicated
• Replication is cluster aware– Automatically handles node changes/failover/rebalance
XDCR Considerations
XDCR: Replication Types
Active/Active XDCR
3333 22
Underlying Operation2
Managed Cache
Dis
k Q
ueue
Disk
Replication Queue
App Server
Couchbase Server Node
Doc 1Doc 1
Doc 1
To other node
XDCR Queue
Doc 1
To other cluster
• Documents are pushed to XDCR during disk write• Checkpoints are used to record replication progress• Documents data and metadata are combined to create unique
change information– Aim is to prevent document update conflicts– Conflict resolution automatic
• Design Documents/Views are not replicated• Network and system outages
– Transient failures cause a pause and restart when network connection available
– Longer problems may require recreation
• Replications are persisted over restarts/reboots
XDCR Internal Operation
XDCR Configuration
• Create a cluster reference– IP address of one node– Use CNAME or alias
• Create a replication– Replications are Unidirectional in nature– Replicates a single bucket to a specific bucket on remote cluster reference
• For bidirectional– Configure replication on Cluster A to Cluster B– Configure replication on Cluster B to Cluster A
• Clusters must be same platform
XDCR Configuration
• XDCR Replication occurs over port 8092– Cluster configuration is loaded on port 8091
• Replication occurs between every node in each cluster– Communication is direct between vBuckets on each node– Every node must be able to communicate on port 8092 to remote cluster
• Checkpoints are used to update progress between clusters– Allows for stop/restart without transferring all data– Optimizes data exchange
XDCR Communication
•Make sure ports 8091 and 8092 are accessible between clusters
• Use the public IP address in the destination cluster
• Use DNS CNAME is ensure individual IP address changes do not affect replication operation
• Traffic is not encrypted– Use VPN for secure transmission
XDCR Configuration in Cloud Deployments
• XDCR is mainly CPU intensive• Number of parallel streams configurable through REST API• Network bandwidth will increase on each node
– Up to double based on changes and stream
• I/O Usage will increase– Up to double based on data sent and received
• RAM usage will increase– As data is queued (from incoming XDCR)
• Bidirectional, and multiple streams, increase requirements further– See http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-
admin-restapi-xdcr-internal-settings.html
XDCR Performance
• Conflict resolution is automatic
• XDCR monitors multiple per-document info to create unique fingerprint:– Document ID– Numerical sequence, which is incremented on each mutation – CAS value – Document flags – Expiration (TTL) value
• Clusters automatically and consistently use the ‘latest’ computed document version
Conflict Resolution
• Use the XDCR Section of the Admin UI– Status column shows ‘Replicating’ when working– ‘Last x errors’ during transient failure– Failed when requires recreation
• Per-bucket, per-replication statistics– Outgoing XDCR monitors replication from this cluster to remote cluster– Incoming XDCR monitors replication from remote cluster to this cluster
Monitoring XDCR
Thank you!
@couchbase
Get Couchbase Server 2.0 http://www.couchbase.com/download
Featured speakers include:
As a thanks for attending this webinar, get 10% off. Use discount code WEBINAR.http://www.couchbase.com/couchbase-london