Upload
couchbase
View
274
Download
1
Tags:
Embed Size (px)
Citation preview
1
Couchbase Q&A
Perry KrugSr. Solutions Architect
Simple. Fast. Elastic.
2
Paid Production Deployments (partial list)
3
Couchbase automatically distributes data across commodity servers. Built-in caching enables apps to read and write data with sub-millisecond latency. And with no schema to manage,
Couchbase effortlessly accommodates changing data management requirements.
Couchbase Server (a.k.a. Membase)
Simple. Fast. Elastic. NoSQL.
4
Modern Interactive Software Architecture
Application Scales OutJust add more commodity web servers
Database Scales UpGet a bigger, more complex server
Expensive & disruptive sharding, doesn’t perform at web scale
5
Data Layer Matches Application Logic Tier Architecture
Application Scales OutJust add more commodity web servers
Database Scales OutJust add more commodity data servers
Scaling out flattens the cost and performance curves
• Horizontally scalable with auto-sharding• High performance at web scale• Schema-less for flexibility
6
COUCHBASE SOLUTION“THE BASICS”
7
COUCHBASE CLIENT LIBRARY
Basic Operation
Docs distributed evenly across servers in the cluster
Each server stores both active & replica docs Only one server active at a time
Client library provides app with simple interface to database
Cluster map provides map to which server doc is on App never needs to know
App reads, writes, updates docs
Multiple App Servers can access same document at same time
Doc 4
Doc 2
Doc 5
SERVER 1
Doc 6
Doc 4
SERVER 2
Doc 7
Doc 1
SERVER 3
Doc 3
User Configured Replica Count = 1
Read/Write/Update
COUCHBASE CLIENT LIBRARY
Read/Write/Update
Doc 9
Doc 7
Doc 8 Doc 6
Doc 3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Doc 9
Doc 5
DOC
DOC
DOC
Doc 1
Doc 8 Doc 2
Replica Docs Replica Docs Replica Docs
Active Docs Active Docs Active Docs
CLUSTER MAP CLUSTER MAP
APP SERVER 1 APP SERVER 2
COUCHBASE SERVER CLUSTER
8
Add Nodes
Two servers added to cluster One-click operation
Docs automatically rebalanced across cluster Even distribution of
docs Minimum doc
movement Cluster map updated
App database calls now distributed over larger # of servers
User Configured Replica Count = 1
Read/Write/Update Read/Write/Update
Doc 7
Doc 9
Doc 3
Active Docs
Replica Docs
Doc 6
COUCHBASE CLIENT LIBRARY
CLUSTER MAP
APP SERVER 1
COUCHBASE CLIENT LIBRARY
CLUSTER MAP
APP SERVER 2
Doc 4
Doc 2
Doc 5
SERVER 1
Doc 6
Doc 4
SERVER 2
Doc 7
Doc 1
SERVER 3
Doc 3
Doc 9
Doc 7
Doc 8 Doc 6
Doc 3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Doc 9
Doc 5
DOC
DOC
DOC
Doc 1
Doc 8 Doc 2
Replica Docs Replica Docs Replica Docs
Active Docs Active Docs Active Docs
SERVER 4 SERVER 5
Active Docs Active Docs
Replica Docs Replica Docs
COUCHBASE SERVER CLUSTER
9
Fail Over Node
App servers happily accessing docs on Server 3
Server fails App server requests to server 3 fail Cluster detects server has failed
Promotes replicas of docs to active Updates cluster map
App server requests for docs now go to appropriate server
Typically rebalance would follow
User Configured Replica Count = 1
Doc 7
Doc 9
Doc 3
Active Docs
Replica Docs
Doc 6
COUCHBASE CLIENT LIBRARY
CLUSTER MAP
APP SERVER 1
COUCHBASE CLIENT LIBRARY
CLUSTER MAP
APP SERVER 2
Doc 4
Doc 2
Doc 5
SERVER 1
Doc 6
Doc 4
SERVER 2
Doc 7
Doc 1
SERVER 3
Doc 3
Doc 9
Doc 7 Doc 8
Doc 6
Doc 3
DOC
DOC
DOCDOC
DOC
DOC
DOC DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc 9
Doc 5DOC
DOC
DOC
Doc 1
Doc 8
Doc 2
Replica Docs Replica Docs Replica Docs
Active Docs Active Docs Active Docs
SERVER 4 SERVER 5
Active Docs Active Docs
Replica Docs Replica Docs
COUCHBASE SERVER CLUSTER
10
PERFORMANCE
11
Your secret weapon: Sub-millisecond AND consistent latency
Object size (Bytes)
Late
ncy (
mic
ro s
econ
ds)
Consistently low latencies in microseconds for varying documents sizes with a mixed workload
12
Your secret weapon: Sub-millisecond AND consistent latency
Number of servers in cluster
Op
era
tion
s p
er
secon
d
High throughput with 1.4 GB/sec data transfer rate using 4 servers
Linear throughput scalability
13
SCALE
14
Draw Something by OMGPOP
15
As usage grew, game data went non-linear.
191715131197533/12826242220181614121082/6
Draw Something by OMGPOPDaily Active Users (millions)
21
2
4
6
8
10
12
14
16
By March 19, there were over 30,000,000 downloads of the app,
over 5,000 drawings being stored per second,over 2,200,000,000 drawings stored,
over 105,000 database transactions per second,and over 3.3 terabytes of data stored. Instagram (7.5M in 5 wks)
16
The game exploded. But Couchbase did not.
Without a second of downtime, and while sustaining front-end performance, the cluster was continuously expanded to support growth, absorbing frequent server hardware failures.
Drawings/second
Total drawings
R/W latency (usec)
Servers
February
6February
13February
20February
27March
5March
12March
19
0 5 12 50 500 1 2.2million million million million billion billion
6 6 6 18 54 72 90
30 40 32 31 38 29 34
0 3 50 333 1660 3000 5400
17
Couchbase Demonstration
• Couchbase ServerTemplate Demo– Starting with one database node
under load– Dynamically scaling database– Easy management and monitoring– Not possible any other database
technology Couchbase Servers
In the EC2 or Datacenter
Web application server
Application user
18
THANK YOU
COUCHBASE SIMPLE, FAST, ELASTIC NOSQL
HTTP://WWW.COUCHBASE.COM