SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
SCALING COUCHDB WITH
BIGCOUCH
a. kocoloski
O’Reilly Webcast
October 2010
2
• Introductions and plugs
• Brief intro to CouchDB
• BigCouch Overview
• Building and Using a CouchDB Cluster
• BigCouch Internals
• Future Plans and How you can Help
OUTLINE
3
INTRODUCTIONS
Cloudant CTO
CouchDB Committer Since 2008
PhD physics MIT 2010
BigCouch
Putting the “C” back in CouchDB
Open Core: 2 years Development
Contact
adam@cloudant.com
kocolosk in #cloudant or #couchdb
@kocolosk
Hashtag of the Day: #bigcouch
4
PLUGS
Hosting, Management, Support for
CouchDB and BigCouch
http://cloudant.com
5
COUCHDB IN A SLIDE
• Schema-free document database management system
Documents are JSON objects
Able to store binary attachments
• RESTful API
http://wiki.apache.org/couchdb/reference
• Views: Custom, persistent representations of your data
Incremental MapReduce with results persisted to disk
Fast querying by primary key (views stored in a B-tree)
• Bi-Directional Replication
Master-slave and multi-master topologies supported
Optional ‘filters’ to replicate a subset of the data
Edge devices (mobile phones, sensors, etc.)
• Futon Web Interface
6
WHY BIGCOUCH?
“CouchDB is built of the web... This
is what software of the future looks
like” -J. Kaplan-Moss
CouchDB is Awesome
...But somewhat incomplete
Cluster
Of
Untrusted
Commodity
Hardware
“CouchDB is not a distributed
database” -J. Ellis
“Without the Clustering, it’s just
OuchDB”
7
WHAT WE TALK ABOUT WHEN
WE TALK ABOUT SCALING
• Horizontal scaling: more servers creates more capacity
• Transparent to the application: adding more capacity should not
affect the business logic of the application.
• No single point of failure.
http://adam.heroku.com/past/2009/7/6/sql_databases_dont_scale/
Pseudo Scalars
8
BIGCOUCH = COUCH+SCALING
• Horizontal Scalability
Easily add storage capacity by adding more
servers
Computing power (views, compaction, etc.)
scales with more servers
• No SPOF
Any node can handle any request
Individual nodes can come and go
• Transparent to the Application
All clustering operations take place “behind
the curtain”
‘looks’ like a single server instance of Couch,
just with more awesome
asterisks and caveats discussed later
9
GRAPHICAL REPRESENTATION
hash(blah) = E
Load Balancer
PUT http://kocolosk.cloudant.com/dbname/blah?w=2
N=3
W=2
R=2
Node 1
A B C D
Node 2
B
C
D
E
N
ode
3
C
D
E
F
Node4
D
E
F
G
Node 24
X
Y
Z
A
• Clustering in a ring (a la
Dynamo)
• Any node can handle a
request
• O(1) lookup
• Quorum system (N, R, W)
• Views distributed like
documents
• Distributed Erlang
• Masterless
10
• Shopping List
3 networked macbook pros
Usual CouchDB Dependencies
BigCouch Code
• http://github.com/cloudant/bigcouch
BUILDING YOUR FIRST CLUSTER
11
BUILDING YOUR FIRST CLUSTER
foo.example.com bar.example.com baz.example.com
Build and Start BigCouch
Pick one node and add the others to the local “nodes” DB
Make sure they all agree on the magic cookie (rel/etc/vm.args)
12
QUORUM: IT’S YOUR FRIEND
• BigCouch databases are governed by 4 parameters
Q: Number of shards
N: Number of redundant copies of each shard
R: Read quorum constant
W: Write quorum constant
(NB: Also consider the number of nodes in a cluster)
For the next few
examples, consider a 5
node cluster
1
2
34
5
13
Q
• Q: The number of shards over which a DB will be spread
consistent hashing space divided into Q pieces
Specified at DB creation time
possible for more than one shard to live on a node
Documents deterministically mapped to a shard
Q=1 Q=4
1
2
34
5
14
N
• N: The number of redundant copies of each document
Choose N>1 for fault-tolerant cluster
Specified at DB creation
Each shard is copied N times
Recommend N>2
1
2
34
5
N=3
15
W
• W: The number of document copies that must be saved
before a document is “written”
W must be less than or equal to N
W=1, maximize throughput
W=N, maximize consistency
Allow for “201” created response
Can be specified at write time
1
2
34
5
W=2
‘201 Created’
16
R
• R: The number of identical document copies that must be
read before a read request is ok
R must be less than or equal to N
R=1, minimize latency
R=N, maximize consistency
Can be specified at query time
Inconsistencies are automatically repaired
1
2
34
5
R=2
VIEWS
• So far, so good, but what about secondary indexes?
Views are built locally on each node, for each DB shard
Mergesort at query time using exactly one copy of each shard
Run a final rereduce on each row if a the view has a reduce
• _changes feed works similarly, but has
no global ordering
Sequence numbers converted
to strings to encode more
information
17
1
2
34
5
18
HACKER PORTION
The BigCouch Stack
CHTTPD
Fabric
Rexi Mem3
Embedded CouchDB
Mochiweb, Spidermonkey, etc.
19
MEM3
CHTTPD
Fabric
Rexi Mem3
Embedded CouchDB
• Maintains the shard mapping for each clustered database in a
node-local CouchDB database
• Changes in the node registration and shard mapping databases are
automatically replicated to all cluster nodes
20
REXI
CHTTPD
Fabric
Rexi Mem3
Embedded CouchDB
• BigCouch makes a large number of parallel RPCs
• Erlang RPC library not designed for heavy parallelism
promiscuous spawning of processes
responses directed back through single process on remote node
requests block until remote ‘rex’ process is monitored
• Rexi removes some of the safeguards
in exchange for lower latencies
no middlemen on the local node
remote process responds directly to client
remote process monitoring occurs
out-of-band
21
FABRIC / CHTTPD
CHTTPD
Fabric
Rexi Mem3
Embedded CouchDB
• Fabric
OTP library application (no processes) responsible for clustered
versions of CouchDB core API calls
Quorum logic, view merging, etc.
Provides a clean Erlang interface to BigCouch
No HTTP awareness
• Chttpd
Cut-n-paste of couch_httpd, but using
fabric for all data access
22
SUMMARY
• BigCouch: putting the ‘C’ back in CouchDB
• http://github.com/cloudant/bigcouch
• https://cloudant.com/future

Weitere ähnliche Inhalte

Was ist angesagt?

Walking the Walk: Developing the MongoDB Backup Service with MongoDB
Walking the Walk: Developing the MongoDB Backup Service with MongoDBWalking the Walk: Developing the MongoDB Backup Service with MongoDB
Walking the Walk: Developing the MongoDB Backup Service with MongoDB
MongoDB
 

Was ist angesagt? (20)

My Learnings on Setting up a Kubernetes Cluster on AWS using Kubernetes Opera...
My Learnings on Setting up a Kubernetes Cluster on AWS using Kubernetes Opera...My Learnings on Setting up a Kubernetes Cluster on AWS using Kubernetes Opera...
My Learnings on Setting up a Kubernetes Cluster on AWS using Kubernetes Opera...
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
ClickHouse Keeper
ClickHouse KeeperClickHouse Keeper
ClickHouse Keeper
 
Building a Data Plane with K8ssandra, Apache Cassandra on Kubernetes
Building a Data Plane with K8ssandra, Apache Cassandra on KubernetesBuilding a Data Plane with K8ssandra, Apache Cassandra on Kubernetes
Building a Data Plane with K8ssandra, Apache Cassandra on Kubernetes
 
Webinar - Approaching 1 billion documents with MongoDB
Webinar - Approaching 1 billion documents with MongoDBWebinar - Approaching 1 billion documents with MongoDB
Webinar - Approaching 1 billion documents with MongoDB
 
Using MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 MinutesUsing MongoDB For BigData in 20 Minutes
Using MongoDB For BigData in 20 Minutes
 
How Scylla Manager Handles Backups
How Scylla Manager Handles BackupsHow Scylla Manager Handles Backups
How Scylla Manager Handles Backups
 
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Altinity Cluster Manager: ClickHouse Management for Kubernetes and CloudAltinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
Altinity Cluster Manager: ClickHouse Management for Kubernetes and Cloud
 
Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...
 
Mongo db admin_20110329
Mongo db admin_20110329Mongo db admin_20110329
Mongo db admin_20110329
 
Scylla Summit 2018: How We Made Large Partition Scans Over Two Times Faster
Scylla Summit 2018: How We Made Large Partition Scans Over Two Times FasterScylla Summit 2018: How We Made Large Partition Scans Over Two Times Faster
Scylla Summit 2018: How We Made Large Partition Scans Over Two Times Faster
 
From monolith to microservice with containers.
From monolith to microservice with containers.From monolith to microservice with containers.
From monolith to microservice with containers.
 
Walking the Walk: Developing the MongoDB Backup Service with MongoDB
Walking the Walk: Developing the MongoDB Backup Service with MongoDBWalking the Walk: Developing the MongoDB Backup Service with MongoDB
Walking the Walk: Developing the MongoDB Backup Service with MongoDB
 
Multimaster
MultimasterMultimaster
Multimaster
 
Flink Forward Berlin 2017: Robert Metzger - Keep it going - How to reliably a...
Flink Forward Berlin 2017: Robert Metzger - Keep it going - How to reliably a...Flink Forward Berlin 2017: Robert Metzger - Keep it going - How to reliably a...
Flink Forward Berlin 2017: Robert Metzger - Keep it going - How to reliably a...
 
MongoUK - Approaching 1 billion documents with MongoDB1 Billion Documents
MongoUK - Approaching 1 billion documents with MongoDB1 Billion DocumentsMongoUK - Approaching 1 billion documents with MongoDB1 Billion Documents
MongoUK - Approaching 1 billion documents with MongoDB1 Billion Documents
 
Cassandra Lunch #59 Functions in Cassandra
Cassandra Lunch #59  Functions in CassandraCassandra Lunch #59  Functions in Cassandra
Cassandra Lunch #59 Functions in Cassandra
 
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
 
CloudAnts - Kubernetes
CloudAnts - KubernetesCloudAnts - Kubernetes
CloudAnts - Kubernetes
 
Использование MongoDB как основной метабазы в UGC-сервисах
Использование MongoDB как основной метабазы в UGC-сервисахИспользование MongoDB как основной метабазы в UGC-сервисах
Использование MongoDB как основной метабазы в UGC-сервисах
 

Andere mochten auch

Interactive Intelligence Sales Brief
Interactive Intelligence Sales BriefInteractive Intelligence Sales Brief
Interactive Intelligence Sales Brief
Inova Solutions
 
Outsourcing startup operations 3 10-13
Outsourcing startup operations 3 10-13Outsourcing startup operations 3 10-13
Outsourcing startup operations 3 10-13
Yipit
 
Investing tips-to-grow-wealth
Investing tips-to-grow-wealthInvesting tips-to-grow-wealth
Investing tips-to-grow-wealth
Motif Investing
 
NextDocs Regulatory Document Management webinar 041211
NextDocs Regulatory Document Management webinar 041211NextDocs Regulatory Document Management webinar 041211
NextDocs Regulatory Document Management webinar 041211
NextDocs
 

Andere mochten auch (19)

IBM MQ Disaster Recovery
IBM MQ Disaster RecoveryIBM MQ Disaster Recovery
IBM MQ Disaster Recovery
 
Z framereporter demo_bci-viador_2010dec02
Z framereporter demo_bci-viador_2010dec02Z framereporter demo_bci-viador_2010dec02
Z framereporter demo_bci-viador_2010dec02
 
Drive genius 3 Mac Utility
Drive genius 3 Mac UtilityDrive genius 3 Mac Utility
Drive genius 3 Mac Utility
 
You're now in charge of Business Continuity Management... what next
You're now in charge of Business Continuity Management... what nextYou're now in charge of Business Continuity Management... what next
You're now in charge of Business Continuity Management... what next
 
Gnarus Tyche Partners
Gnarus Tyche PartnersGnarus Tyche Partners
Gnarus Tyche Partners
 
Interactive Intelligence Sales Brief
Interactive Intelligence Sales BriefInteractive Intelligence Sales Brief
Interactive Intelligence Sales Brief
 
Don't Laugh At Local SEO - Every Dealer Needs It!
Don't Laugh At Local SEO - Every Dealer Needs It!Don't Laugh At Local SEO - Every Dealer Needs It!
Don't Laugh At Local SEO - Every Dealer Needs It!
 
DMA - Art of Targeting and Personalization
DMA -  Art of Targeting and PersonalizationDMA -  Art of Targeting and Personalization
DMA - Art of Targeting and Personalization
 
Four futures for health and social care integration - a response from Veredus
Four futures for health and social care integration - a response from VeredusFour futures for health and social care integration - a response from Veredus
Four futures for health and social care integration - a response from Veredus
 
Outsourcing startup operations 3 10-13
Outsourcing startup operations 3 10-13Outsourcing startup operations 3 10-13
Outsourcing startup operations 3 10-13
 
Making it Big in Hospitality: Strategies for Growing Your Restaurant
Making it Big in Hospitality: Strategies for Growing Your RestaurantMaking it Big in Hospitality: Strategies for Growing Your Restaurant
Making it Big in Hospitality: Strategies for Growing Your Restaurant
 
Investing tips-to-grow-wealth
Investing tips-to-grow-wealthInvesting tips-to-grow-wealth
Investing tips-to-grow-wealth
 
Into the Breach-Data Breach Statistics Infographic
Into the Breach-Data Breach Statistics InfographicInto the Breach-Data Breach Statistics Infographic
Into the Breach-Data Breach Statistics Infographic
 
20140610-RallyON 2014 - Agile Metrics Panel
20140610-RallyON 2014 - Agile Metrics Panel20140610-RallyON 2014 - Agile Metrics Panel
20140610-RallyON 2014 - Agile Metrics Panel
 
Introduction to Amazon Web Services by i2k2 Networks
Introduction to Amazon Web Services by i2k2 NetworksIntroduction to Amazon Web Services by i2k2 Networks
Introduction to Amazon Web Services by i2k2 Networks
 
Obesity Europe 2014
Obesity Europe 2014Obesity Europe 2014
Obesity Europe 2014
 
Synchronize Code and Documentation - An introduction to Cucumber and Java
Synchronize Code and Documentation - An introduction to Cucumber and JavaSynchronize Code and Documentation - An introduction to Cucumber and Java
Synchronize Code and Documentation - An introduction to Cucumber and Java
 
Better Payroll Days Ahead with Automated, Cloud-Based Time and Attendance
Better Payroll Days Ahead with Automated, Cloud-Based Time and AttendanceBetter Payroll Days Ahead with Automated, Cloud-Based Time and Attendance
Better Payroll Days Ahead with Automated, Cloud-Based Time and Attendance
 
NextDocs Regulatory Document Management webinar 041211
NextDocs Regulatory Document Management webinar 041211NextDocs Regulatory Document Management webinar 041211
NextDocs Regulatory Document Management webinar 041211
 

Ähnlich wie Scaling CouchDB with BigCouch

Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
Putting rails and couch db on the cloud -  Indicthreads cloud computing confe...Putting rails and couch db on the cloud -  Indicthreads cloud computing confe...
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
IndicThreads
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOO
James Hollingworth
 

Ähnlich wie Scaling CouchDB with BigCouch (20)

NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)
 
RethinkDB - the open-source database for the realtime web
RethinkDB - the open-source database for the realtime webRethinkDB - the open-source database for the realtime web
RethinkDB - the open-source database for the realtime web
 
Codemotion 2015 Infinispan Tech lab
Codemotion 2015 Infinispan Tech labCodemotion 2015 Infinispan Tech lab
Codemotion 2015 Infinispan Tech lab
 
An Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformAn Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media Platform
 
NoSQL Intro with cassandra
NoSQL Intro with cassandraNoSQL Intro with cassandra
NoSQL Intro with cassandra
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and Cassasdra
 
Learning To Relax
Learning To RelaxLearning To Relax
Learning To Relax
 
Above the cloud: Big Data and BI
Above the cloud: Big Data and BIAbove the cloud: Big Data and BI
Above the cloud: Big Data and BI
 
Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-features
 
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
Putting rails and couch db on the cloud -  Indicthreads cloud computing confe...Putting rails and couch db on the cloud -  Indicthreads cloud computing confe...
Putting rails and couch db on the cloud - Indicthreads cloud computing confe...
 
No sql Database
No sql DatabaseNo sql Database
No sql Database
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4oct
 
NoSQL on the move
NoSQL on the moveNoSQL on the move
NoSQL on the move
 
NOSQL in the Cloud
NOSQL in the CloudNOSQL in the Cloud
NOSQL in the Cloud
 
Introductio to Docker and usage in HPC applications
Introductio to Docker and usage in HPC applicationsIntroductio to Docker and usage in HPC applications
Introductio to Docker and usage in HPC applications
 
Cassandra and Spark
Cassandra and SparkCassandra and Spark
Cassandra and Spark
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOO
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)
 
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBSilicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDB
 

Scaling CouchDB with BigCouch

  • 1. SCALING COUCHDB WITH BIGCOUCH a. kocoloski O’Reilly Webcast October 2010
  • 2. 2 • Introductions and plugs • Brief intro to CouchDB • BigCouch Overview • Building and Using a CouchDB Cluster • BigCouch Internals • Future Plans and How you can Help OUTLINE
  • 3. 3 INTRODUCTIONS Cloudant CTO CouchDB Committer Since 2008 PhD physics MIT 2010 BigCouch Putting the “C” back in CouchDB Open Core: 2 years Development Contact adam@cloudant.com kocolosk in #cloudant or #couchdb @kocolosk Hashtag of the Day: #bigcouch
  • 4. 4 PLUGS Hosting, Management, Support for CouchDB and BigCouch http://cloudant.com
  • 5. 5 COUCHDB IN A SLIDE • Schema-free document database management system Documents are JSON objects Able to store binary attachments • RESTful API http://wiki.apache.org/couchdb/reference • Views: Custom, persistent representations of your data Incremental MapReduce with results persisted to disk Fast querying by primary key (views stored in a B-tree) • Bi-Directional Replication Master-slave and multi-master topologies supported Optional ‘filters’ to replicate a subset of the data Edge devices (mobile phones, sensors, etc.) • Futon Web Interface
  • 6. 6 WHY BIGCOUCH? “CouchDB is built of the web... This is what software of the future looks like” -J. Kaplan-Moss CouchDB is Awesome ...But somewhat incomplete Cluster Of Untrusted Commodity Hardware “CouchDB is not a distributed database” -J. Ellis “Without the Clustering, it’s just OuchDB”
  • 7. 7 WHAT WE TALK ABOUT WHEN WE TALK ABOUT SCALING • Horizontal scaling: more servers creates more capacity • Transparent to the application: adding more capacity should not affect the business logic of the application. • No single point of failure. http://adam.heroku.com/past/2009/7/6/sql_databases_dont_scale/ Pseudo Scalars
  • 8. 8 BIGCOUCH = COUCH+SCALING • Horizontal Scalability Easily add storage capacity by adding more servers Computing power (views, compaction, etc.) scales with more servers • No SPOF Any node can handle any request Individual nodes can come and go • Transparent to the Application All clustering operations take place “behind the curtain” ‘looks’ like a single server instance of Couch, just with more awesome asterisks and caveats discussed later
  • 9. 9 GRAPHICAL REPRESENTATION hash(blah) = E Load Balancer PUT http://kocolosk.cloudant.com/dbname/blah?w=2 N=3 W=2 R=2 Node 1 A B C D Node 2 B C D E N ode 3 C D E F Node4 D E F G Node 24 X Y Z A • Clustering in a ring (a la Dynamo) • Any node can handle a request • O(1) lookup • Quorum system (N, R, W) • Views distributed like documents • Distributed Erlang • Masterless
  • 10. 10 • Shopping List 3 networked macbook pros Usual CouchDB Dependencies BigCouch Code • http://github.com/cloudant/bigcouch BUILDING YOUR FIRST CLUSTER
  • 11. 11 BUILDING YOUR FIRST CLUSTER foo.example.com bar.example.com baz.example.com Build and Start BigCouch Pick one node and add the others to the local “nodes” DB Make sure they all agree on the magic cookie (rel/etc/vm.args)
  • 12. 12 QUORUM: IT’S YOUR FRIEND • BigCouch databases are governed by 4 parameters Q: Number of shards N: Number of redundant copies of each shard R: Read quorum constant W: Write quorum constant (NB: Also consider the number of nodes in a cluster) For the next few examples, consider a 5 node cluster 1 2 34 5
  • 13. 13 Q • Q: The number of shards over which a DB will be spread consistent hashing space divided into Q pieces Specified at DB creation time possible for more than one shard to live on a node Documents deterministically mapped to a shard Q=1 Q=4 1 2 34 5
  • 14. 14 N • N: The number of redundant copies of each document Choose N>1 for fault-tolerant cluster Specified at DB creation Each shard is copied N times Recommend N>2 1 2 34 5 N=3
  • 15. 15 W • W: The number of document copies that must be saved before a document is “written” W must be less than or equal to N W=1, maximize throughput W=N, maximize consistency Allow for “201” created response Can be specified at write time 1 2 34 5 W=2 ‘201 Created’
  • 16. 16 R • R: The number of identical document copies that must be read before a read request is ok R must be less than or equal to N R=1, minimize latency R=N, maximize consistency Can be specified at query time Inconsistencies are automatically repaired 1 2 34 5 R=2
  • 17. VIEWS • So far, so good, but what about secondary indexes? Views are built locally on each node, for each DB shard Mergesort at query time using exactly one copy of each shard Run a final rereduce on each row if a the view has a reduce • _changes feed works similarly, but has no global ordering Sequence numbers converted to strings to encode more information 17 1 2 34 5
  • 18. 18 HACKER PORTION The BigCouch Stack CHTTPD Fabric Rexi Mem3 Embedded CouchDB Mochiweb, Spidermonkey, etc.
  • 19. 19 MEM3 CHTTPD Fabric Rexi Mem3 Embedded CouchDB • Maintains the shard mapping for each clustered database in a node-local CouchDB database • Changes in the node registration and shard mapping databases are automatically replicated to all cluster nodes
  • 20. 20 REXI CHTTPD Fabric Rexi Mem3 Embedded CouchDB • BigCouch makes a large number of parallel RPCs • Erlang RPC library not designed for heavy parallelism promiscuous spawning of processes responses directed back through single process on remote node requests block until remote ‘rex’ process is monitored • Rexi removes some of the safeguards in exchange for lower latencies no middlemen on the local node remote process responds directly to client remote process monitoring occurs out-of-band
  • 21. 21 FABRIC / CHTTPD CHTTPD Fabric Rexi Mem3 Embedded CouchDB • Fabric OTP library application (no processes) responsible for clustered versions of CouchDB core API calls Quorum logic, view merging, etc. Provides a clean Erlang interface to BigCouch No HTTP awareness • Chttpd Cut-n-paste of couch_httpd, but using fabric for all data access
  • 22. 22 SUMMARY • BigCouch: putting the ‘C’ back in CouchDB • http://github.com/cloudant/bigcouch • https://cloudant.com/future