introduction_to_couchbase_server_tokyo_14
TRANSCRIPT
![Page 1: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/1.jpg)
![Page 2: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/2.jpg)
Introduction to Couchbase Server
Matt Ingenthron
Director, Developer Solutions
![Page 3: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/3.jpg)
Couchbase ServerNoSQL Document Database
![Page 4: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/4.jpg)
Couchbase Open Source 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
分散型データベースとエコシステムに注力
Key-valueとドキュメント指向のニーズをサポート
全てのCouchbase製品はApache 2.0で公開
エンタープライズ版とコミュニティー版を提供
![Page 5: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/5.jpg)
In this session
• Overview of Couchbase Server features
• What’s new in Couchbase Server 2.1 and 2.2
• Architectural Overview and Couchbase Operations
• Live Demo with a peak into new features
Couchbase Serverの特徴について
Couchbase Server2.1から2.2のバージョンアップ情報
アーキテクチャの概要と各処理の解説
ピーク時のデモ紹介と新機能について
![Page 6: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/6.jpg)
Easy Scalability
Consistent High Performance
Always On
24x365
アプリケーションの変更やダウンタイム伴わず、クリックをするだけでサーバの追加が可能
常時1ミリ秒以下でデータの読込み/書込みを行う
ソフトウェアとハードウェアのアップグレードやメンテナンス時にダウンタイムを必要としない
JSONJSON
JSON
JSONJSON
Flexible Data Model
データベース構築時にスキーマ定義を必要としないJSON
ドキュメントモデル
Couchbase Server
![Page 7: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/7.jpg)
Core Couchbase Server Features
Built-in clustering – All nodes equal
Data replication with auto-failover
Zero-downtime maintenance
Built-in managed cache
Append-only storage layer
Online compaction
Monitoring and admin API & UI
SDK for a variety of languages
マスタのノードを必要としないクラスタ
データを複製し、自動フェイルオーバーが可能
メンテナンス時にダウンタイムを必要としない
組み込み式のキャッシュ
追記専用のストレージ層
システムを停止せずにデータを最適化
監視および管理用のAPIとUIを提供
さまざまな言語向けのSDKをサポート
![Page 8: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/8.jpg)
2.0 introduced
JSON support Indexing and Querying
Cross data center replicationIncremental Map Reduce
JSONJSON
JSON
JSONJSON
JSONサポート インデックスと検索機能
インクリメンタルMapReduce
XDCR(クロスデータセンタレプリケーション)
![Page 9: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/9.jpg)
2.1 introduced New in 2.2
Multi-threaded persistence engine
Optimistic XDCR
CBHealthcheck – Cluster health check tool
Hostname management
Rebalance progress indicators
New XDCR protocol based on memcached
Read-only admin user
Automated and optimized purge management
CBRecovery Data recovery tool from remote clusters
Non-root, non-sudo install
Learn more about the health checker in the “Keeping your cluster healthy” session from Couchbase [SF]
マルチスレッドの永続化エンジン
XDCR(クラスタ間のレプリケーション)
クラスタのヘルスチェック機能
ホスト名の管理
リバランスの進捗状況表示
MemcachedベースのXDCRプロトコール
閲覧専用の管理ユーザの機能を追加
データの自動最適化機能
リモート操作によるデータの復元機能
システム管理者権限なしでインストール可能
![Page 10: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/10.jpg)
Couchbase Server Architecture
Hea
rtb
eat
Pro
cess
mo
nit
or
Glo
bal
sin
glet
on
su
per
viso
r
Co
nfi
gura
tio
n m
anag
er
on each node
Reb
alan
ce o
rch
estr
ato
r
No
de
hea
lth
mo
nit
or
one per cluster
vBu
cket
sta
te a
nd
rep
licat
ion
man
ager
httpR
EST
man
age
me
nt
AP
I/W
eb
UI
HTTP
8091Erlang port mapper
4369Distributed Erlang
21100 - 21199
Erlang/OTP
storage interface
Couchbase EP Engine
11210Memcapable 2.0
Moxi
11211Memcapable 1.0
Memcached
New Persistence Layer
8092Query API
Qu
ery
En
gin
e
Data Manager Cluster Manager
![Page 11: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/11.jpg)
Couchbase Server Architecture
Replication, Rebalance, Shard State Manager
REST management API/Web UI
8091Admin Console
Erla
ng
/OTP
11210 / 11211Data access ports
Object-managedCache
Multi-threaded Persistence Engine
8092Query API
Qu
ery
En
gin
e
http
Data Manager Cluster Manager
![Page 12: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/12.jpg)
Couchbase Operations
![Page 13: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/13.jpg)
33 2
Single node - Couchbase Write Operation
Managed Cache
Dis
k Q
ueu
e
Disk
Replication Queue
App Server
Couchbase Server Node
Doc 1Doc 1
Doc 1
To other node
![Page 14: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/14.jpg)
33 2
Single node - Couchbase Update Operation
Managed Cache
Dis
k Q
ueu
e
Replication Queue
App Server
Doc 1’
Doc 1
Doc 1’Doc 1
Doc 1’
Disk
To other node
Couchbase Server Node
![Page 15: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/15.jpg)
GET
Do
c 1
33 2
Single node - Couchbase Read Operation
Dis
k Q
ueu
e
Replication Queue
App Server
Doc 1
Doc 1Doc 1
Managed Cache
Disk
To other node
Couchbase Server Node
![Page 16: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/16.jpg)
33 2
Single node – Couchbase Cache Miss2
Dis
k Q
ueu
e
Replication Queue
App Server
Couchbase Server Node
Doc 1
Doc 3Doc 5 Doc 2Doc 4
Doc 6 Doc 5 Doc 4 Doc 3 Doc 2
Doc 4
GET
Do
c 1
Doc 1
Doc 1
Managed Cache
Disk
To other node
![Page 17: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/17.jpg)
Basic Operation
• Docs distributed evenly across servers
• Each server stores both active and 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
User Configured Replica Count = 1
COUCHBASE SERVER CLUSTER
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
ドキュメントはサーバ間に均等に分散配置される
各サーバは、アクティブとレプリカのドキュメントの両方を格納 (データは1つのサーバのみアクティブ)
クライアントライブラリはシンプルなインターフェースを提供
クラスタマップはどのサーバのドキュメントがアクティブ状態であるかを示す
アプリケーションはドキュメントの読込み、書込み、アップデートを行う
各サーバは同時に同じドキュメントにアクセスすることが可能
![Page 18: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/18.jpg)
Add Nodes to Cluster
• Two servers addedOne-click operation
• Docs automatically rebalanced across cluster (Even distribution of docs Minimum 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
たった1回のクリックでサーバ2台を簡単に追加
ドキュメントはクラスタ内で自動的に再配置される
クラスタマップのアップデート
アプリケーションは意識することなく、追加したサーバに再配置されたデータにアクセス可能
![Page 19: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/19.jpg)
Fail Over Node
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 9
Doc 8
Doc Doc 6 Doc
Doc
Doc 5 Doc
Doc 2
Doc 8 Doc
Doc
Doc
Doc 1 Doc 3
APP SERVER 1
COUCHBASE Client Library
CLUSTER MAP
COUCHBASE Client Library
CLUSTER MAP
APP SERVER 2
User Configured Replica Count = 1
COUCHBASE SERVER CLUSTER
Learn more about running “Couchbase in production”in Perry’s session at 15:15
• App servers accessing docs
• Requests to Server 3 fail
• Cluster detects server failedPromotes replicas of docs to active Updates cluster map
• Requests for docs now go toappropriate server
• Typically rebalance would follow
アプリケーションサーバがドキュメントにアクセス
サーバ3がダウン
クラスタがサーバダウンを検知(レプリカをアクティブに昇格)
ドキュメントをアプリケーションに送る
通常はその後リバランスがされる
![Page 20: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/20.jpg)
Demo Time
![Page 21: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/21.jpg)
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 22: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/22.jpg)
33 2
Cross data center replication – Data flow2
Managed Cache
Dis
k Q
ueu
e
Disk
Replication Queue
App Server
Couchbase Server Node
Doc 1Doc 1
Doc 1
To other node
XDCR Engine
Doc 1
To other cluster
![Page 23: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/23.jpg)
SERVER 3SERVER 1 SERVER 2
Couchbase Server – San Francisco
SERVER 3SERVER 1 SERVER 2
Couchbase Server – New York
Optimistic replication
Per replication Tunable Parameters
Optimized protocolbased on memcached
Reliability and performance at scale
Cross Data Center Replication (XDCR)
![Page 24: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/24.jpg)
Demo Time
![Page 25: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/25.jpg)
What’s else is New?
![Page 26: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/26.jpg)
Couchbase Query Language
N1QL
Our next generation query language for JSON
Read “Nickel”
Learn more about N1QL at query.couchbase.com
In Dev Preview
ニッケル(SQLライクなクエリ言語)
![Page 27: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/27.jpg)
www.couchbase.com/download
Couchbase Server
![Page 29: Introduction_to_couchbase_server_tokyo_14](https://reader033.vdocuments.site/reader033/viewer/2022060202/559c64871a28abd10c8b4721/html5/thumbnails/29.jpg)