30
1 Introduction to Couchbase Server 2.0 Dipti Borkar Director, Product Management

CCSF12-Intro-to-Couchbase-Server-2.0

Embed Size (px)

Citation preview

Page 1: CCSF12-Intro-to-Couchbase-Server-2.0

1

Introduction to Couchbase Server 2.0

Dipti BorkarDirector, Product Management

Page 2: CCSF12-Intro-to-Couchbase-Server-2.0

22

Couchbase Server

NoSQL Database

Page 3: CCSF12-Intro-to-Couchbase-Server-2.0

33

Couchbase Server

Easy Scalabili

ty

Consistent, High

Performance

Always On

24x7x365

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.

Page 4: CCSF12-Intro-to-Couchbase-Server-2.0

4

Couchbase Server Features

Built-in clustering – All nodes equal

Data replication with auto-failover

Zero- downtime maintenance

Clone to grow and scale horizontally

Page 5: CCSF12-Intro-to-Couchbase-Server-2.0

5

Couchbase Server Features

Built-in managed cached

Monitoring and administration APIs and GUI

SDK for a variety of languages

Page 6: CCSF12-Intro-to-Couchbase-Server-2.0

66

Couchbase Server

2.0

NoSQL DatabaseNoSQL Document Database

Page 7: CCSF12-Intro-to-Couchbase-Server-2.0

7

Flexible Data Model

Schemaless data model 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 8: CCSF12-Intro-to-Couchbase-Server-2.0

8

New in Two

JSON support Indexing and Querying

Cross data center replicationIncremental Map Reduce

Page 9: CCSF12-Intro-to-Couchbase-Server-2.0

9

Couchbase Server 2.0 Architecture

Hea

rtbe

at

Proc

ess

mon

itor

Glo

bal s

ingl

eton

sup

ervi

sor

Confi

gura

tion

man

ager

on each node

Reba

lanc

e or

ches

trat

or

Nod

e he

alth

mon

itor

one per cluster

vBuc

ket s

tate

and

repl

icati

on m

anag

er

httpRE

ST m

anag

emen

t API

/Web

UI

HTTP8091

Erlang port mapper4369

Distributed Erlang21100 - 21199

Erlang/OTP

storage interface

Couchbase EP Engine

11210Memcapable 2.0

Moxi

11211Memcapable 1.0

Memcached

New Persistence Layer

8092Query API

Que

ry E

ngin

e

Data Manager Cluster Manager

Page 10: CCSF12-Intro-to-Couchbase-Server-2.0

10

Couchbase Server 2.0 Architecture

Hea

rtbe

at

Proc

ess

mon

itor

Glo

bal s

ingl

eton

sup

ervi

sor

Confi

gura

tion

man

ager

on each node

Reba

lanc

e or

ches

trat

or

Nod

e he

alth

mon

itor

one per cluster

vBuc

ket s

tate

and

repl

icati

on m

anag

er

httpRE

ST m

anag

emen

t API

/Web

UI

HTTP8091

Erlang port mapper4369

Distributed Erlang21100 - 21199

Erlang/OTP

storage interface

Couchbase EP Engine

11210Memcapable 2.0

Moxi

11211Memcapable 1.0

Memcached

New Persistence Layer

8092Query API

Que

ry E

ngin

e

Page 11: CCSF12-Intro-to-Couchbase-Server-2.0

11

COUCHBASE OPERATIONS

Page 12: CCSF12-Intro-to-Couchbase-Server-2.0

12

33 2

Single node - Couchbase Write Operation2

Managed Cache

Dis

k Q

ueue

Disk

Replication Queue

App Server

Couchbase Server Node

Doc 1Doc 1

Doc 1

To other node

Page 13: CCSF12-Intro-to-Couchbase-Server-2.0

13

33 2

Single node - Couchbase Update Operation2

Managed Cache

Dis

k Q

ueue

Replication Queue

App Server

Couchbase Server Node

Doc 1’

Doc 1

Doc 1’Doc 1

Doc 1’

Disk

To other node

Page 14: CCSF12-Intro-to-Couchbase-Server-2.0

14

GET

Doc

1

33 2

Single node - Couchbase Read Operation2

Dis

k Q

ueue

Replication Queue

App Server

Couchbase Server Node

Doc 1

Doc 1Doc 1

Managed Cache

Disk

To other node

Page 15: CCSF12-Intro-to-Couchbase-Server-2.0

15

COUCHBASE SERVER CLUSTER

Basic Operation

• Docs distributed evenly across servers

• Each server stores both active and replica docsOnly one server active at a time

• Client library provides app with simple interface to database

• Cluster map provides map to which server doc is onApp never needs to know

• App reads, writes, updates docs

• Multiple app servers can access same document at same time

User Configured Replica Count = 1

READ/WRITE/UPDATE

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc

SERVER 1

ACTIVE

Doc 4

Doc 7

Doc

Doc

Doc

SERVER 2

Doc 8

ACTIVE

Doc 1

Doc 2

Doc

Doc

Doc

REPLICA

Doc 4

Doc 1

Doc 8

Doc

Doc

Doc

REPLICA

Doc 6

Doc 3

Doc 2

Doc

Doc

Doc

REPLICA

Doc 7

Doc 9

Doc 5

Doc

Doc

Doc

SERVER 3

Doc 6

APP SERVER 1

COUCHBASE Client Library

CLUSTER MAP

COUCHBASE Client Library

CLUSTER MAP

APP SERVER 2

Doc 9

Page 16: CCSF12-Intro-to-Couchbase-Server-2.0

16

Add Nodes to Cluster

• Two servers addedOne-click operation

• Docs automatically rebalanced across clusterEven distribution of docsMinimum doc movement

• Cluster map updated

• App database calls now distributed over larger number of servers

REPLICA

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc 4

Doc 1

Doc

Doc

SERVER 1

REPLICA

ACTIVE

Doc 4

Doc 7

Doc

Doc

Doc 6

Doc 3

Doc

Doc

SERVER 2

REPLICA

ACTIVE

Doc 1

Doc 2

Doc

Doc

Doc 7

Doc 9

Doc

Doc

SERVER 3 SERVER 4 SERVER 5

REPLICA

ACTIVE

REPLICA

ACTIVE

Doc

Doc 8 Doc

Doc 9 Doc

Doc 2 Doc

Doc 8 Doc

Doc 5 Doc

Doc 6

READ/WRITE/UPDATE READ/WRITE/UPDATE

APP SERVER 1

COUCHBASE Client Library

CLUSTER MAP

COUCHBASE Client Library

CLUSTER MAP

APP SERVER 2

COUCHBASE SERVER CLUSTER

User Configured Replica Count = 1

Page 17: CCSF12-Intro-to-Couchbase-Server-2.0

18

DEMO TIME

Page 18: CCSF12-Intro-to-Couchbase-Server-2.0

19

COUCHBASE SERVER CLUSTER

Indexing and Querying

User Configured Replica Count = 1

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc

SERVER 1

REPLICA

Doc 4

Doc 1

Doc 8

Doc

Doc

Doc

APP SERVER 1

COUCHBASE Client Library

CLUSTER MAP

COUCHBASE Client Library

CLUSTER MAP

APP SERVER 2

Doc 9

• Indexing work is distributed amongst nodes

• Large data set possible

• Parallelize the effort

• Each node has index for data stored on it

• Queries combine the results from required nodes

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc

SERVER 2

REPLICA

Doc 4

Doc 1

Doc 8

Doc

Doc

Doc

Doc 9

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc

SERVER 3

REPLICA

Doc 4

Doc 1

Doc 8

Doc

Doc

Doc

Doc 9

Query

Page 19: CCSF12-Intro-to-Couchbase-Server-2.0

20

Cross Data Center Replication (XDCR)

COUCHBASE SERVER CLUSTERNY 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

DocRAM

DISK

Doc Doc Doc

DISK

Doc Doc Doc

DISK

COUCHBASE SERVER CLUSTERSF 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

DocRAM

DISK

Doc Doc Doc

DISK

Doc Doc Doc

DISK

Page 20: CCSF12-Intro-to-Couchbase-Server-2.0

21

Couchbase SDKs

Java SDK

.Net SDK

PHP SDK

Ruby SDK

…and many more

Java client API

User Code

Couchbase Server

CouchbaseClient cb = new CouchbaseClient(listURIs,"aBucket", "letmein");

cb.set("hello", 0, "world");cb.get("hello");

http://www.couchbase.com/develop

Couchbase Java Library (spymemcached)

Page 21: CCSF12-Intro-to-Couchbase-Server-2.0

22

DEMO TIME

Page 22: CCSF12-Intro-to-Couchbase-Server-2.0

23

Demo: The next big social game

3 Objects (documents) within game:• Players•Monsters• Items

Gameplay:• Players fight monsters•Monsters drop items• Players own items

Page 23: CCSF12-Intro-to-Couchbase-Server-2.0

24

Player Document

{"jsonType": "player","uuid": "35767d02-a958-4b83-8179-616816692de1","name": "Keith4540","hitpoints": 75,"experience": 663,"level": 4,"loggedIn": false

}

Player ID

Page 24: CCSF12-Intro-to-Couchbase-Server-2.0

25

Item Document

{"jsonType": "item","name": "Katana_e5890c94-11c6-65746ce6c560","uuid": "e5890c94-11c6-4856-a7a6-65746ce6c560","ownerId": "Dale9887"

}

Item ID

Player ID

Page 25: CCSF12-Intro-to-Couchbase-Server-2.0

26

Monster Document

{"jsonType": "monster","name": "Bauchan9932","uuid": "d10dfc1b-0412-4140-b4ec-affdbf2aa5ec","hitpoints": 370,"experienceWhenKilled": 52,"itemProbability": 0.5050581341872865

}

Monster ID

Page 26: CCSF12-Intro-to-Couchbase-Server-2.0

27

GAME ON!

Page 27: CCSF12-Intro-to-Couchbase-Server-2.0

28

Linear Scaling: Couchbase + Cisco + Solarflare

Linear throughput scalability

High throughput with 1.4 GB/sec data transfer rate

using 4 servers

Page 28: CCSF12-Intro-to-Couchbase-Server-2.0

29

2.0 Betais Here.

JSON Documents Indexing Querying

Cross Data Center Replication

Page 29: CCSF12-Intro-to-Couchbase-Server-2.0

30

THANK YOU!

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

[email protected]@dborkar

Page 30: CCSF12-Intro-to-Couchbase-Server-2.0

31

QUESTIONS?