webinar - couchbase server 2.0 and cross datacenter replication

27

Upload: couchbase

Post on 08-Jul-2015

830 views

Category:

Technology


3 download

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

Page 1: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication
Page 2: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

Featured speakers include:

As a thanks for attending this webinar, get 10% off. Use discount code WEBINAR.http://www.couchbase.com/couchbase-london

Page 3: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

Couchbase Server 2.0 and Cross Datacenter Replication

(XDCR)

Alex Ma

Senior Systems Engineer, Couchbase

Page 4: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 5: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

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

Page 6: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

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

Page 7: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

New in 2.0

JSON support Indexing and Querying

Cross datacenter replicationIncremental Map Reduce

JSONJSONJSON

JSONJSON

Page 8: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

Market Adoption – CustomersInternet Companies Enterprises

Page 9: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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)

Page 10: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

XDCR Use Case: Unidirectional

• Hot spares (active backup)

• Development/testing

• Offline analysis/processing

Page 11: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

XDCR Use Case: Bidirectional

•Multiple clusters for distributing workload

• Cluster for client update/operations

• Cluster for company updates/operations

Page 12: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

XDCR Use Case: Multiple

• Geographically Local Clusters

Page 13: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 14: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

XDCR: Replication Types

Page 15: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

Active/Active XDCR

Page 16: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

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

Page 17: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 18: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

XDCR Configuration

Page 19: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 20: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 21: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

•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

Page 22: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 23: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 24: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

• 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

Page 25: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

Thank you!

[email protected]

@couchbase

Get Couchbase Server 2.0 http://www.couchbase.com/download

Page 26: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication

Featured speakers include:

As a thanks for attending this webinar, get 10% off. Use discount code WEBINAR.http://www.couchbase.com/couchbase-london

Page 27: Webinar - Couchbase Server 2.0 and Cross Datacenter Replication