What You Need to Know to Move from a Relational to a NoSQL Database
-
Upload
dataversity -
Category
Technology
-
view
1.816 -
download
2
description
Transcript of What You Need to Know to Move from a Relational to a NoSQL Database
1
Database solutions for web and mobile applications.
2
WHY NOSQL?
Zynga’s games serve over 235 million active users per month. We depend on technology from Couchbase to make that possible. We have improved the performance and availability of our games while reducing hardware and administration costs. We will continue to transition our data from relational databases to Couchbase technology.
Cadir Lee Chief Technology Officer, Zynga
“
”
3
Interactive software – then and now
4
Scaling economics in the Web application stack
Application Scales Out Just add more commodity web servers
Database Scales Up Get a bigger, more complex server
5
Lacking market solutions, users forced to invent
Dynamo October 2007
Cassandra August 2008
Voldemort February 2009
Bigtable November 2006
Very few organizations want to (fewer can) build and maintain database technology. Couchbase was founded to create packaged, commercially-supported NoSQL database products.
• No schema required before inserting data
• No schema change required to change data format
• Auto-sharding without application participation
• Distributed query support
• Automatic data replication across servers and regions
Common characteristics of these “NoSQL” technologies
6
COUCHBASE Simple. Fast. Elastic.
7
Couchbase is a “document-oriented” NoSQL database Simple. Flexible. Adjust to changing data management requirements with ease.
{ “UUID”: “21f7f8de-8051-5b89-86 “Time”: “2011-04-01T13:01:02.42 “Server”: “A2223E”, “Calling Server”: “A2213W”, “Type”: “E100”, “Initiating User”: “[email protected]”, “Details”: { “IP”: “10.1.1.22”, “API”: “InsertDVDQueueItem”, “Trace”: “cleansed”, “Tags”: [ “SERVER”, “US-West”, “API” ] } }
Example JSON document
Application Server
No schema required to insert data (or change data format later). Lightweight, cross-platform document format (JSON). Efficient, native support for binary attachments.
Sim
ple
.
8
Document data model
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
datum
{ “UUID”: “21f7f8de-8051-5b89-86“Time”: “2011-04-01T13:01:02.42“Server”: “A2223E”,
“Calling Server”: “A2213W”,“Type”: “E100”,“Initiating User”: “[email protected]”,“Details”:
{
“IP”: “10.1.1.22”,“API”: “InsertDVDQueueItem”,“Trace”: “cleansed”,“Tags”:
[
“SERVER”, “US-West”, “API”]
}
}
{ “UUID”: “21f7f8de-8051-5b89-86“Time”: “2011-04-01T13:01:02.42“Server”: “A2223E”,
“Calling Server”: “A2213W”,“Type”: “E100”,“Initiating User”: “[email protected]”,“Details”:
{
“IP”: “10.1.1.22”,“API”: “InsertDVDQueueItem”,“Trace”: “cleansed”,“Tags”:
[
“SERVER”, “US-West”, “API”]
}
}
{ “UUID”: “21f7f8de-8051-5b89-86“Time”: “2011-04-01T13:01:02.42“Server”: “A2223E”,
“Calling Server”: “A2213W”,“Type”: “E100”,“Initiating User”: “[email protected]”,“Details”:
{
“IP”: “10.1.1.22”,“API”: “InsertDVDQueueItem”,“Trace”: “cleansed”,“Tags”:
[
“SERVER”, “US-West”, “API”]
}
}
{ “UUID”: “21f7f8de-8051-5b89-86“Time”: “2011-04-01T13:01:02.42“Server”: “A2223E”,
“Calling Server”: “A2213W”,“Type”: “E100”,“Initiating User”: “[email protected]”,“Details”:
{
“IP”: “10.1.1.22”,“API”: “InsertDVDQueueItem”,“Trace”: “cleansed”,“Tags”:
[
“SERVER”, “US-West”, “API”]
}
}
Relational data model Document data model
Highly-structured table organization with rigidly-defined data formats and record
structure.
Collection of complex documents with arbitrary, nested data formats and
varying “record” format.
9
Couchbase is consistently fast Decouple application performance (user experience) from sketchy database I/O.
Memcached, the most widely deployed in-memory caching technology on the planet, is built in to Couchbase, enabling consistently low-latency data reads and writes. We wrote most of memcached.
Application Server
Memcached Fast
.
10
Couchbase is elastic (scales out for increased capacity)
Grow with linear cost, constant performance and without downtime
Expanding (or contracting) a Couchbase cluster is effortless; and requires no application downtime. Other NoSQL solutions require complex configuration and application downtime.
Application Server
Elas
tic.
11
Elasticity courtesy of Membase technology Proven in the world’s largest NoSQL production deployments
Membase has proven itself in multi-hundred node deployments at Zynga, AOL and others. There is a BIG difference between a 20 node and a 750 node cluster. Couchbase is the only NoSQL solution that can scale, and remain manageable, from a single node to a multi-hundred node cluster.
Pushbutton rebalancing of a live, 100+ node cluster
Watch a live, 100 node cluster rebalance at: http://blog.couchbase.com/take-a-tour-membase-server-one-dot-seven
Application Server
Memcached
Membase
Enterprise-class cluster monitoring and administration
12
Couchbase Mobile
CouchSync
Unique to Couchbase, CouchSync permits automated synchronization of databases between intermittently-connected mobile devices and a datacenter- or cloud-resident Couchbase cluster
13
AD AND OFFER TARGETING AOL serves billions of impressions per day from our ad serving platforms, and any incremental improvement in processing time translates to huge benefits in our ability to more effectively serve the ads needed to meet our contractual commitments. Traditional databases lack the scalability required to support our goal of five milliseconds per read/write. Creating user profiles with Hadoop, then serving them from Couchbase, reduces profile read and write access to under a millisecond, leaving the bulk of the processing time budget for improved targeting and customization.
Pero Subasic Chief Architect, AOL
“
”
14
Ad and offer targeting
events
profiles, campaigns
profiles, real time campaign statistics
40 milliseconds to respond with the decision.
2
3
1
15
SOCIAL AND ONLINE GAMING Zynga’s FarmVille, Café World, Mafia Wars and other games have over 235 million active users per month. We rely on technology from Membase to make that possible. As long-time users and members of the Memcached community, we have tremendous respect for the team at Membase. Zynga's internal development work to extend memcached clearly matched with their vision and we’ve worked closely with the team through the development of Membase Server. We expect to improve the performance and availability of our games while reducing hardware and administration costs as we continue to transition data from relational databases to Membase technology.
Cadir Lee Chief Technology Officer, Zynga
“
”
16
Social and online gaming
1
2
3
17
CLOUD DATA SERVICES As the operator of Korea’s number one search portal, Naver.com; the number one children’s portal, Jr.naver.com; and the number one gaming portal, Hangame.com; NHN collectively serves nearly 70 million unique users. It is imperative that we provide each of them with the user experience they expect. With its multi-tenancy capabilities, Couchbase has enabled us to build a shared, centrally managed data cloud service for our development studios with service quality guarantees, secure separation of data and instant provisioning for new properties.
Chang Song Chief Performance Architect, NHN Corporation
“
”
18
Cloud data services
PROVISIONING
PROVISIONING
2
3
1
4
19
SQL QUERY CACHING The Knot (www.theknot.com) is the Internet’s most-trafficked one-stop wedding planning solution. We selected Couchbase, in part, because it was drop-in compatible with memcached. With no change to our running applications, Couchbase provided a highly-available, easy-to-manage distributed solution for caching SQL queries and accelerating our application performance. While we are using it primarily for caching today, we have big plans to implement indexed search and storage solutions.
Jason Sirota Director of Application Architecture, The Knot
“
”
20
SQL query caching
RDBMS
21
SESSION STATE STORAGE
23
REAL-TIME LOGGING AND ALERTING Loggly has become the leading Logging as a Service platform and Couchbase is a key ingredient in our technology stack. We use Couchbase NoSQL technology to drive real-time collection of logging traffic to facilitate aggregation and statistical analysis; it stores and tracks the amount of logging activity by user, by time, and by server. Membase is a great fit for our team because it is Memcached-compatible, making it easy to setup and use – it just works!
Jon Gifford Chief Technology Officer, Loggly
“
”
24
Real-time logging and alerting
Loggly customer software system
Loggly customer software system
Loggly customer software system 2
3
1