RDBMS Scales Up Get a bigger, more complex server Users Applica;on Scales Out Just add more commodity web servers Users System Cost Applica;on Performance Rela2onal Database Web/App Server Tier System Cost Applica;on Performance Won’t scale beyond this point How do you take this growth? Monday, October 28, 13
Scales Out Cost and performance mirrors app ;er Users NoSQL Distributed Data Store Web/App Server Tier Applica;on Scales Out Just add more commodity web servers Users System Cost Applica;on Performance Applica;on Performance System Cost NoSQL Technology Scales Out Monday, October 28, 13
February 2009 Very few organiza)ons want to (fewer can) build and maintain database so]ware technology. But every organiza)on building interac)ve web applica)ons needs this technology. A New Technology? Building new database to answer the following requirements • No schema required before inser)ng data • No schema change required to change data format • Auto-‐sharding without applica)on par)cipa)on • Distributed queries • Integrated main memory caching • Data synchroniza)on ( mul)-‐datacenter) Monday, October 28, 13
data Performance challenges Cost All of these Other 49% 35% 29% 16% 12% 11% Source: Couchbase Survey, December 2011, n = 1351. What Is Biggest Data Management Problem Driving Use of NoSQL in Coming Year? Monday, October 28, 13
model Collec;on of complex documents with arbitrary, nested data formats and varying “record” format. Highly-‐structured table organiza;on with rigidly-‐defined data formats and record structure. JSON JSON C1 C2 C3 C4 JSON { } Monday, October 28, 13
Zablo Event Info ID Title Speaker_id Frank Weigel 1 Paris JUG rbin 2 QCON UK tgrall 3 NoSQL CLN johnz 4 Devoxx fweigel ID Name rbin tgrall johnz fweigel A talk could be done by one or more speakers! 1. Create a new table 2.“Prepare” the Data (move to new table, drop column) 3. Change the constraints 4. Change the app Monday, October 28, 13
24x365 Grow cluster without applicaAon changes, without downAme with a single click Consistent sub-‐millisecond read and write response Ames with consistent high throughput No downAme for sodware upgrades, hardware maintenance, etc. Flexible Data Model JSON document model with no fixed schema. JSON JSON JSON JSON JSON PERFORMANCE Couchbase Server Core Principles Monday, October 28, 13
2.0 11211 Memcapable 1.0 Object-‐level Cache Disk Persistence 8092 Query API Query Engine HTTP 8091 Erlang port mapper 4369 Distributed Erlang 21100 -‐ 21199 Heartbeat Process monitor Global singleton supervisor Configura;on manager on each node Rebalance orchestrator Node health monitor one per cluster vBucket state and replica;on manager hRp REST management API/Web UI Erlang/OTP Server/Cluster Management & Communica2on (Erlang) The Unreasonable Effectiveness of C by Damien Katz Couchbase Architecture Moxi RAM Cache, Indexing & Persistence Management (C & V8) Monday, October 28, 13
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 Indexing and Querying Monday, October 28, 13
browsing • Our adapter is aware of changing Couchbase topology • Indexed by Elastic Search after stored to disk in Couchbase ElasPcSearch Full Text Search Monday, October 28, 13