Mee6ng Objec6ves/Agenda Who and What is Couchbase? When should I use Couchbase? Why Couchbase vs Oracle? Couchbase Server & Mobile – The Basics Next Steps, NDA, POC or project engagement
company > 4x growth in 2013; Widely recognized as industry leader Worldwide opera6ons with > 150 employees >75 in engineering; more than doubling every year Support offices in US (mul2ple), UK, India, Japan, China (soon) Leader in scalability & high performance Easily & reliable scale your app; Get consistent low latency & high throughput Only NoSQL vendor with mobile database + sync Recognized as most innova6ve NoSQL vendor Provide KV & document database for web & mobile apps Flexible, schemaless JSON data model; 100% open source Mission cri6cal deployments at large enterprises & internet companies > 400 customers; >10,000 paid produc2on nodes deployed; worldwide customer base Couchbase, Inc. Confiden2al
Scalability Must Dynamically Scale Apps to Support Millions of Users • Centralized, scale up architecture with big, expensive servers • Manual sharding at app level struggles to support “web scale” • High so_ware costs & TCO • Distributed, scale-‐out architecture with cluster of low-‐cost, commodity servers • Auto-‐sharding at database level to support Big Data, Big Users • Open source & lower TCO RDBMS Scales Up Get a bigger, more complex server Users Applica6on Scales Out Just add more commodity web servers Users System Cost Applica2on Performance System Cost Applica2on Performance Won’t scale beyond this point Couchbase, Inc. Confiden2al
Rela6onal vs Document Data Model Rela6onal data model Document data model Collec2on of complex documents with arbitrary, nested data formats and varying “record” format. Highly-‐structured table organiza2on with rigidly-‐defined data formats and record structure. JSON JSON C1 C2 C3 C4 JSON { }
RDBMS Example: User Profile Address Info 1 DEN 30303 CO 2 MV 94040 CA 3 CHI 60609 IL User Info KEY First ZIP_id Last 4 NY 10010 NY 1 Frank 2 Weigel 2 Ali 2 Dodson 3 Mark 2 Azad 4 Steve 3 Yen ZIP_id CITY ZIP STATE 1 Frank 2 Weigel To get info about specific user, you perform a join across two tables
All data in a single document Document Example: User Profile { “ID”: 1, “FIRST”: “Frank”, “LAST”: “Weigel”, “ZIP”: “94040”, “CITY”: “MV”, “STATE”: “CA” } JSON = +
Performance Consumers & Employees Demand Highly Responsive Apps • Architecture based on “speed of disk” • Requires joins across hundreds or thousands of tables • High throughput requires very expensive hardware • Architecture based on “speed to memory” • Faster access to aggregated, de-‐normalized objects • High throughput at low TCO with cluster of commodity servers Applica2on layer RDBMS Cache Applica2on layer RDBMS Cache Couchbase Couchbase, Inc. Confiden2al
Overview Couchbase offers a full range of Data Management solu6ons High Availability Cache Key Value Document Mobile device SSN: 400 658 9993 Pass: ****** Pass: ******
Couchbase Server Is The Complete Solu6on One click scalability and no app changes. Sub millisecond latency with high throughput for reads and writes. Maintenance, upgrades and cluster resizing all online without applica2on down2me JSON document model with no fixed schema. ✔ ✔ ✔ ✔ Consistent High Performance Flexible Data Model Easy Scalability Always On 24x7x365
Single Node Type No Manual Sharding Database manages data movement to scale out -‐ Not the user Database handles propaga2on of updates to scale across clusters and geos Provides disaster recover / data locality Hugely simplifies management of clusters Easy to scale clusters by adding any # of nodes FEATURES Auto Sharding Couchbase, Inc. Confiden2al
Fine Grained Locking Built-‐in Cache Hash Par66oning Allows high concurrency and in turn high throughput via highly granular latches No need of separate cache layer Database manages ac2vely used data Uniform data distribu2on Uniform load distribu2on – NO hotspots PERFORMANCE Support a large number of users needed for interac2ve apps Massive Concurrent Connec6ons FEATURES Couchbase, Inc. Confiden2al
All admin opera2ons online • Compac2on • Indexing • Rebalance • Backup & Restore • High availability using in-‐memory replica2on • Auto or manual failover • XDCR for disaster recovery Online administra6ve opera6ons HA via Replica6on DR via XDCR FEATURES Online DB upgrades and HW maintenance Op2mized swap opera2on to replace nodes Online DB upgrades and maintenance Couchbase, Inc. Confiden2al
Represent data as objects instead of shredding into rows and columns Create indexes on any anribute of the document Each document can have a different structure Easy to change data without database changes and down2me Maintains Na6ve object representa6on Handles constantly changing data JSON JSON JSON JSON JSON FEATURES Data with mixed structure bener managed via JSON in a document DB than an RDBMS Schema-‐less for structured / un/ semi-‐ structured data Couchbase, Inc. Confiden2al
A look into some specific use cases Web app or Use-‐case Couchbase Solu6on Example Customer Content Store & Metadata System Couchbase document store + Elas2c Search Social Game & Mobile App Couchbase store game and player data Ad Targe6ng Couchbase stores user informa2on for fast access User Profile Store Couchbase Server as a key-‐value store Session Store Couchbase Server as a key-‐value store High Availability Caching Tier Couchbase Server as a memcached 2er replacement Chat/Messaging Platorm Couchbase Server Mobile Couchbase Server, Sync Gateway & Couchbase Lite
#1 mission-‐cri2cal centralized service Cloud, music, and app services 800M+ profiles • Replacement of Oracle Streams • Evaluated Cassandra and mongoDB • Chose Couchbase for ability to scale to mul6ple DCs, performance, and replica6on latency • Deployed Couchbase in produc6on since September 2013 • 240 Server nodes, 3 datacenters, 200K reads/sec, 20K writes/sec • DBA core team deemed Couchbase reliable easy to maintain Top Tier Consumer Electronics Company
Analy)cs • Company McGraw-‐Hill Educa2on Labs: A Self Adap2ng, Interac2ve Learning Portal • Applica6on Requirements An interac2ve learning environment that scales to millions of learners Serves MHE as well as third party content Self=adapts via usage data • Experimented with other types of database Infrastructure XML databases SQL/MR Engines In-‐memory data grids Enterprise search servers • Pain None allowed for elas2c scaling under spike periods Couldn’t catalog & deliver content from many sources Needed consistent low-‐latency for metadata and stats access Needed full-‐text search support for content discovery • Couchbase Benefits Scalability: simple scaleout to support 11 million users producing 4 petabytes of digital content data. Persistence Low latency: sub millisecond response 2mes Front end Middleware Back-‐end
Auto Sharding and Cluster Map Hash func6on (KEY) vB1 vB2 vB3 vB4 vB5 vB6 Physical servers A B C More scalability required Add node Logical Par66ons Cluster Map New Cluster Map
3 3 2 Single node – Couchbase Write Opera6on Managed Cache Disk Queue Disk Replica2on Queue App Server Couchbase Server Node To other node Doc 1 Doc 1 Doc 1
3 3 2 Single node – Couchbase Update Opera6on Managed Cache Disk Queue Disk Replica2on Queue App Server Couchbase Server Node To other node Doc 1 Doc 1 Doc 1 Doc 1 Doc 1
3 3 2 Single node – Couchbase Read Opera6on Managed Cache Disk Queue Disk Replica2on Queue App Server Couchbase Server Node To other node Doc 1 Get Doc 1 Doc 1 Doc 1
XDCR: Cross Data Center Replica6on US DATA CENTER hnp://blog.groosy.com/wp-‐content/uploads/2011/10/internet-‐map.jpg EURPOE DATA CENTER ASIA DATA CENTER
ACTIVE SERVER 1 RAM DISK Doc Doc 2 Doc 9 Doc Doc Doc ACTIVE SERVER 2 RAM DISK Doc Doc Doc Doc Doc Doc ACTIVE SERVER 3 RAM DISK Doc Doc Doc Doc Doc Doc Cross Data Center Replica6on (XDCR) COUCHBASE SERVER CLUSTER NYC DATA CENTER COUCHBASE SERVER CLUSTER SF DATA CENTER ACTIVE SERVER 1 RAM DISK Doc Doc 2 Doc 9 Doc Doc Doc ACTIVE SERVER 2 RAM DISK Doc Doc Doc Doc Doc Doc ACTIVE SERVER 3 RAM DISK Doc Doc Doc Doc Doc Doc { } { } { } { } { } { } { } { } { } { } { } { } { }
Indexing and Querying Features • Index and Query Distributed indexing and querying Secondary indexes of JSON document content Flexible querying of indexes • Incremental Map-‐Reduce Distributed simple real-‐2me analy2cs Only considers changes due to updated data • Full Text Search Robust integra2on with Elas2cSearch cluster Flexible full text search and faceted search
Couchbase Server • JSON on the device Developers increasingly prefer NoSQL database • JSON on the wire No need for data transforma2on • JSON in the cloud Flexible data model High performance Easy scalability Server Sync Gateway Lite JS N JS N JS N
Architecture SERVER 3 SERVER 1 SERVER 2 Couchbase Server Channel Sync Gateway Channel Channel Sync Gateway Channel Couchbase Lite for iOS and Android On Premise In the cloud
only NoSQL Database for Mobile Devices • Features Ultra-‐lightweight, secure JSON database Na2ve support for iOS, Android and REST/HTML5 Full document, index and querying and sync capabili2es Powerful conflict resolu2on Lite Couchbase Lite Android Couchbase Lite iOS
NoSQL Database Considera6ons Easy Scalability Flexible Data Model Always On 24x7x365 Grow cluster without applica2on changes, without down2me when needed Always awesome experience for your applica2on users. The sun never sets on the Internet, your applica2on needs the database to always serve data. Keep developers produc2ve and allow fast and easy addi2on of new features JSON JSON JSON JSON JSON PERFORMANCE Consistent High Performance
Couchbase Server Is The Complete Solu6on One click scalability and no app changes. Sub millisecond latency with high throughput for reads and writes. Maintenance, upgrades and cluster resizing all online without applica2on down2me JSON document model with no fixed schema. ✔ ✔ ✔ ✔ Consistent High Performance Flexible Data Model Easy Scalability Always On 24x7x365
Enterprise vs. Community Edi6on Enterprise Edi6on Community Edi6on Cost • Free for pre-‐produc2on • Star2ng at $2,700/node/yr • Free Produc6on Readiness Produc2on Ready • Take open source snapshots • Put through rigorous QA process, fix bugs Unknown Produc2on Readiness • Built with latest open source • Undefined quality Features Differences Enterprise Focused Proprietary Features • Rack/Zone Awareness • Encryp2on support for XDCR • None Technical Support Professional Support • Defined SLAs from the experts • Immediate hot bug fixes Community/Forum Support • No SLA, unknown response 2mes • No bugs fixes assured in a 2mely manner Best Prac6ce Exper6se Broad Best Prac2ce Exper2se • From working with 100s of customers Exper2se of community members • Based on limited individual exper2se Release Support Long-‐Tail Release Support • Including hot bug fixes No Support for Old Releases • Must support old releases yourself License Type Commercial License • Std license terms, SLA, indemnity Simple “As is” license Intended Use Produc2on Deployments Non-‐Produc2on Use, Simple Use Cases