SlideShare a Scribd company logo
Deep dive into the native
multi-model database ArangoDB
Frank Celler
Percona Live 2016, Santa Clara, 20 April 2016
www.arangodb.com
Overview
is a multi-model Database
Features
is a document store, a key/value store and a graph database,
offers convenient queries (via HTTP/REST and AQL),
including joins between different collections,
and graph queries,
with configurable consistency guarantees using transactions.
is a multi-model Database
Features
is a document store, a key/value store and a graph database,
offers convenient queries (via HTTP/REST and AQL),
including joins between different collections,
and graph queries,
with configurable consistency guarantees using transactions.
=⇒ Allows polyglot persistence with multiple instances of a single technology.
is extensible by JavaScript Code
The Foxx Microservice Framework
Allows you to extend the HTTP/REST API by your own routes, which you
implement in JavaScript running on the database server, with direct access
to the C++ DB engine.
is extensible by JavaScript Code
The Foxx Microservice Framework
Allows you to extend the HTTP/REST API by your own routes, which you
implement in JavaScript running on the database server, with direct access
to the C++ DB engine.
Unprecedented possibilities for data centric services:
custom-made complex queries or authorizations
schema-validation
push feeds, etc.
is a Data Center Operating System App
These days, computing clusters run Data Center Operating Systems.
is a Data Center Operating System App
These days, computing clusters run Data Center Operating Systems.
Idea
Distributed applications can be deployed as easily as one installs a mobile
app on a phone.
is a Data Center Operating System App
These days, computing clusters run Data Center Operating Systems.
Idea
Distributed applications can be deployed as easily as one installs a mobile
app on a phone.
Cluster resource management is automatic.
This leads to significantly better resource utilization.
Fault tolerance, self-healing and automatic failover is guaranteed.
Details
The Multi-Model Approach
Multi-model database
A multi-model database combines a document store with a graph
database and is at the same time a key/value store,
with a common query language for all three data models.
The Multi-Model Approach
Multi-model database
A multi-model database combines a document store with a graph
database and is at the same time a key/value store,
with a common query language for all three data models.
Important:
is able to compete with specialised products on their turf
allows for polyglot persistence using a single database technology
In a microservice architecture, there will be several different deployments.
performance
https://www.arangodb.com/2015/10/benchmark-postgresql-mongodb-arangodb/
Why is multi-model possible at all?
Document stores and key/value stores
Document stores: have primary key, are key/value stores.
Without using secondary indexes, performance is nearly as good as with
opaque data instead of JSON.
Good horizontal scalability can be achieved for key lookups.
horizontal scalability
Experiment: Single document writes (1kB / doc) on cluster of sizes 8 to 80 machi-
nes (64 to 640 vCPUs), another 4 to 40 load servers, running on AWS.
https://mesosphere.com/blog/2015/11/30/arangodb-benchmark-dcos/
Why is multi-model possible at all?
Document stores and graph databases
Graph database: would like to associate arbitrary data with vertices and
edges, so JSON documents are a good choice.
A good edge index, giving fast access to neighbours.
This can be a secondary index.
Graph support in the query language.
Implementations of graph algorithms in the DB engine.
https://www.arangodb.com/2016/04/
index-free-adjacency-hybrid-indexes-graph-databases/
Replication and Sharding
ArangoDB provides (Version 2.8, January 2016)
Sharding with automatic data distribution,
easy setup of (asynchronous) replication (cluster and single),
fault tolerance by automatic failover,
full integration with Apache Mesos and Mesosphere DC/OS.
Replication and Sharding
ArangoDB provides (Version 2.8, January 2016)
Sharding with automatic data distribution,
easy setup of (asynchronous) replication (cluster and single),
fault tolerance by automatic failover,
full integration with Apache Mesos and Mesosphere DC/OS.
Work in progress (Version 3.0, RC in April 2016):
synchronous replication in cluster mode,
zero administration by a self-repairing and self-balancing cluster architecture.
Data-Center Operating Systems
Resource Management
Installation should be as easy as possible
integration into the resource management of data-center
gives better resource utilisation,
full integration with Apache Mesos and Mesosphere DC/OS
Data-Center Operating Systems
Resource Management
Installation should be as easy as possible
integration into the resource management of data-center
gives better resource utilisation,
full integration with Apache Mesos and Mesosphere DC/OS
Work in progress
Mesosphere DC/OS a very mature, Open-Source solution
later this year integration also for Kubernetes, Docker-Swarm
About Mesosphere’s DC/OS
https://dcos.io
Installing Mesosphere’s DC/OS
https://dcos.io
Installing Mesosphere’s DC/OS
https://dcos.io
Powerful query language
AQL
The built in Arango Query Language allows
complex, powerful and convenient queries,
with transaction semantics,
allowing to do joins,
AQL is independent of the driver used and
offers protection against injections by design.
Extensible through JavaScript
The Foxx Microservice Framework
Allows you to extend the HTTP/REST API by your own routes, which you
implement in JavaScript running on the database server, with direct access
to the C++ DB engine.
Extensible through JavaScript
The Foxx Microservice Framework
Allows you to extend the HTTP/REST API by your own routes, which you
implement in JavaScript running on the database server, with direct access
to the C++ DB engine.
Unprecedented possibilities for data centric services:
complex queries or authorizations, schema-validation, push feeds, etc.
easy deployment via web interface or REST API,
automatic API description through Swagger =⇒ discoverability of services.
Use Cases
Use case: Aircraft fleet management
Use case: Aircraft fleet management
One of our customers uses ArangoDB to
store each part, component, unit or aircraft as a document
model containment as a graph
thus can easily find all parts of some component
keep track of maintenance intervals
perform queries orthogonal to the graph structure
thereby getting good efficiency for all needed queries
http://radar.oreilly.com/2015/07/
data-modeling-with-multi-model-databases.html
Use case: rights management
Use case: rights management
Right managements in relational model is hard:
looks like a forest at first
then exceptions pop-up
one company sub-contracts another for a special station
an engineer works for two companies
some-one needs special permissions when being a proxy
much easier expressed as graph structure
Use case: e-commerce
Use case: e-commerce
AboutYou uses ArangoDB to
create channels showing new products
allow recommendation to friends
celebrities presenting new fashion
blog about fashion products
nightly business analysis
news stream
https://www.arangodb.com/case-studies/
aboutyou-data-driven-personalization-with-arangodb/
Action
First deployment: a simple key/value store
A key/value store
One collection “data”, indexes on “value” (sorted) and “name” (hash).
Single document requests
Indexes possible
Range queries possible
Second deployment: a Microservice as a Foxx app
A Foxx Microservice
Simple TODO app, deployed from app store with web UI.
REST/JSON API available
Swagger generates API description automatically
Third deployment: a single server graph database
A Graph Database
Graph “worldCountry” with vertex collection “worldVertex” and edge
collection “worldEdges”, links from cities to countries to continents to
world.
Show some graph traversals.
Show graph viewer.
Fourth deployment: a multi-model application
A multi-model database
Some data from a web shop.
Show some queries.
AQL
Internals
Life of a query
Text and query parameters come from user
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Reason about distribution in cluster
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Reason about distribution in cluster
Optimise distributed EXPs
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Reason about distribution in cluster
Optimise distributed EXPs
Estimate costs for all EXPs, and sort by ascending cost
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Reason about distribution in cluster
Optimise distributed EXPs
Estimate costs for all EXPs, and sort by ascending cost
Instanciate “cheapest” plan, i.e. set up execution engine
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Reason about distribution in cluster
Optimise distributed EXPs
Estimate costs for all EXPs, and sort by ascending cost
Instanciate “cheapest” plan, i.e. set up execution engine
Distribute and link up engines on different servers
Life of a query
Text and query parameters come from user
Parse text, produce abstract syntax tree (AST)
Substitute query parameters
First optimisation: constant expressions, etc.
Translate AST into an execution plan (EXP)
Optimise one EXP, produce many, potentially better EXPs
Reason about distribution in cluster
Optimise distributed EXPs
Estimate costs for all EXPs, and sort by ascending cost
Instanciate “cheapest” plan, i.e. set up execution engine
Distribute and link up engines on different servers
Execute plan, provide cursor API
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Query → EXP
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Query → EXP
Black arrows are
dependencies
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Query → EXP
Black arrows are
dependencies
Think of a pipeline
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Query → EXP
Black arrows are
dependencies
Think of a pipeline
Each node provides
a cursor API
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Query → EXP
Black arrows are
dependencies
Think of a pipeline
Each node provides
a cursor API
Blocks of “Items”
travel through the
pipeline
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Query → EXP
Black arrows are
dependencies
Think of a pipeline
Each node provides
a cursor API
Blocks of “Items”
travel through the
pipeline
What is an “item”???
Pipeline and items
FOR a IN collA EnumerateCollection a
EnumerateCollection b
Singleton
Calculation xx
FOR b IN collB
LET xx = a.x Items have vars a, xx
Items have no vars
Items are the thingies traveling through the pipeline.
Pipeline and items
FOR a IN collA EnumerateCollection a
EnumerateCollection b
Singleton
Calculation xx
FOR b IN collB
LET xx = a.x Items have vars a, xx
Items have no vars
Items are the thingies traveling through the pipeline.
An item holds values of those variables in the current frame
Pipeline and items
FOR a IN collA EnumerateCollection a
EnumerateCollection b
Singleton
Calculation xx
FOR b IN collB
LET xx = a.x Items have vars a, xx
Items have no vars
Items are the thingies traveling through the pipeline.
An item holds values of those variables in the current frame
Thus: Items look differently in different parts of the plan
Pipeline and items
FOR a IN collA EnumerateCollection a
EnumerateCollection b
Singleton
Calculation xx
FOR b IN collB
LET xx = a.x Items have vars a, xx
Items have no vars
Items are the thingies traveling through the pipeline.
An item holds values of those variables in the current frame
Thus: Items look differently in different parts of the plan
We always deal with blocks of items for performance reasons
Execution plans
FOR a IN collA
RETURN {x: a.x, z: b.z}
EnumerateCollection a
EnumerateCollection b
Calculation xx == b.y
Filter xx == b.y
Singleton
Calculation xx
Return {x: a.x, z: b.z}
Calc {x: a.x, z: b.z}
FILTER xx == b.y
FOR b IN collB
LET xx = a.x
Move filters up
FOR a IN collA
FOR b IN collB
FILTER a.x == 10
FILTER a.u == b.v
RETURN {u:a.u,w:b.w}
Singleton
EnumColl a
EnumColl b
Calc a.x == 10
Return {u:a.u,w:b.w}
Filter a.u == b.v
Calc a.u == b.v
Filter a.x == 10
Move filters up
FOR a IN collA
FOR b IN collB
FILTER a.x == 10
FILTER a.u == b.v
RETURN {u:a.u,w:b.w}
The result and behaviour does not
change, if the first FILTER is pulled
out of the inner FOR.
Singleton
EnumColl a
EnumColl b
Calc a.x == 10
Return {u:a.u,w:b.w}
Filter a.u == b.v
Calc a.u == b.v
Filter a.x == 10
Move filters up
FOR a IN collA
FILTER a.x < 10
FOR b IN collB
FILTER a.u == b.v
RETURN {u:a.u,w:b.w}
The result and behaviour does not
change, if the first FILTER is pulled
out of the inner FOR.
However, the number of items trave-
ling in the pipeline is decreased.
Singleton
EnumColl a
Return {u:a.u,w:b.w}
Filter a.u == b.v
Calc a.u == b.v
Calc a.x == 10
EnumColl b
Filter a.x == 10
Move filters up
FOR a IN collA
FILTER a.x < 10
FOR b IN collB
FILTER a.u == b.v
RETURN {u:a.u,w:b.w}
The result and behaviour does not
change, if the first FILTER is pulled
out of the inner FOR.
However, the number of items trave-
ling in the pipeline is decreased.
Note that the two FOR statements
could be interchanged!
Singleton
EnumColl a
Return {u:a.u,w:b.w}
Filter a.u == b.v
Calc a.u == b.v
Calc a.x == 10
EnumColl b
Filter a.x == 10
Remove unnecessary calculations
FOR a IN collA
LET L = LENGTH(a.hobbies)
FOR b IN collB
FILTER a.u == b.v
RETURN {h:a.hobbies,w:b.w}
Singleton
EnumColl a
Calc L = ...
EnumColl b
Calc a.u == b.v
Filter a.u == b.v
Return {...}
Remove unnecessary calculations
FOR a IN collA
LET L = LENGTH(a.hobbies)
FOR b IN collB
FILTER a.u == b.v
RETURN {h:a.hobbies,w:b.w}
The Calculation of L is unnecessary!
Singleton
EnumColl a
Calc L = ...
EnumColl b
Calc a.u == b.v
Filter a.u == b.v
Return {...}
Remove unnecessary calculations
FOR a IN collA
FOR b IN collB
FILTER a.u == b.v
RETURN {h:a.hobbies,w:b.w}
The Calculation of L is unnecessary!
(since it cannot throw an exception).
Singleton
EnumColl a
EnumColl b
Calc a.u == b.v
Filter a.u == b.v
Return {...}
Remove unnecessary calculations
FOR a IN collA
FOR b IN collB
FILTER a.u == b.v
RETURN {h:a.hobbies,w:b.w}
The Calculation of L is unnecessary!
(since it cannot throw an exception).
Therefore we can just leave it out.
Singleton
EnumColl a
EnumColl b
Calc a.u == b.v
Filter a.u == b.v
Return {...}
Use index for FILTER and SORT
FOR a IN collA
FILTER a.x > 17 &&
a.x <= 23 &&
a.y == 10
SORT a.y, a.x
RETURN a
Singleton
EnumColl a
Filter ...
Calc ...
Sort a.y, a.x
Return a
Use index for FILTER and SORT
FOR a IN collA
FILTER a.x > 17 &&
a.x <= 23 &&
a.y == 10
SORT a.y, a.x
RETURN a
Assume collA has a skiplist index on “y”
and “x” (in this order),
Singleton
EnumColl a
Filter ...
Calc ...
Sort a.y, a.x
Return a
Use index for FILTER and SORT
FOR a IN collA
FILTER a.x > 17 &&
a.x <= 23 &&
a.y == 10
SORT a.y, a.x
RETURN a
Assume collA has a skiplist index on “y”
and “x” (in this order), then we can read
off the half-open interval between
{ y: 10, x: 17 } and
{ y: 10, x: 23 }
from the skiplist index.
Singleton
Sort a.y, a.x
Return a
IndexRange a
Use index for FILTER and SORT
FOR a IN collA
FILTER a.x > 17 &&
a.x <= 23 &&
a.y == 10
SORT a.y, a.x
RETURN a
Assume collA has a skiplist index on “y”
and “x” (in this order), then we can read
off the half-open interval between
{ y: 10, x: 17 } and
{ y: 10, x: 23 }
from the skiplist index.
The result will automatically be sorted by
y and then by x.
Singleton
Return a
IndexRange a
Data distribution in a cluster
Requests
DBserver DBserver DBserver
CoordinatorCoordinator
4 2 5 3 11
The shards of a collection are distributed across the DB servers.
Data distribution in a cluster
Requests
DBserver DBserver DBserver
CoordinatorCoordinator
4 2 5 3 11
The shards of a collection are distributed across the DB servers.
The coordinators receive queries and organise their execution
Scatter/gather
EnumerateCollection
Scatter/gather
Remote
EnumShard
Remote Remote
EnumShard
Remote
Concat/Merge
Remote
EnumShard
Remote
Scatter
Scatter/gather
Remote
EnumShard
Remote Remote
EnumShard
Remote
Concat/Merge
Remote
EnumShard
Remote
Scatter
Links
https://www.arangodb.com
https://docs.arangodb.com/cookbook/index.html
https://github.com/ArangoDB/guesser
http://mesos.apache.org/
https://mesosphere.com/
https://mesosphere.github.io/marathon/
https://dcos.io

More Related Content

PDF
Processing large-scale graphs with Google Pregel
PDF
Overhauling a database engine in 2 months
PDF
Extensible Database APIs and their role in Software Architecture
PDF
Query mechanisms for NoSQL databases
PDF
Multi model-databases
PDF
Deep Dive on ArangoDB
PDF
Scaling ArangoDB on Mesosphere DCOS
PDF
Webinar: How native multi model works in ArangoDB
Processing large-scale graphs with Google Pregel
Overhauling a database engine in 2 months
Extensible Database APIs and their role in Software Architecture
Query mechanisms for NoSQL databases
Multi model-databases
Deep Dive on ArangoDB
Scaling ArangoDB on Mesosphere DCOS
Webinar: How native multi model works in ArangoDB

What's hot (20)

PDF
Introduction and overview ArangoDB query language AQL
PDF
Introduction to ArangoDB (nosql matters Barcelona 2012)
PDF
Introduction to Foxx by our community member Iskandar Soesman @ikandars
PDF
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
PDF
Multi-model databases and node.js
PDF
FOXX - a Javascript application framework on top of ArangoDB
PDF
Scaling ArangoDB on Mesosphere DCOS
PDF
AvocadoDB query language (DRAFT!)
PDF
guacamole: an Object Document Mapper for ArangoDB
PDF
ArangoDB – A different approach to NoSQL
PDF
Introduction to column oriented databases
PDF
Jan Steemann: Modelling data in a schema free world (Talk held at Froscon, 2...
PDF
An introduction to multi-model databases
PPTX
PPTX
MongoDB - A next-generation database that lets you create applications never ...
PDF
Complex queries in a distributed multi-model database
PDF
Experience with C++11 in ArangoDB
PDF
ArangoDB 3.7 Roadmap: Performance at Scale
PDF
Introduction and overview ArangoDB query language AQL
Introduction to ArangoDB (nosql matters Barcelona 2012)
Introduction to Foxx by our community member Iskandar Soesman @ikandars
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
Multi-model databases and node.js
FOXX - a Javascript application framework on top of ArangoDB
Scaling ArangoDB on Mesosphere DCOS
AvocadoDB query language (DRAFT!)
guacamole: an Object Document Mapper for ArangoDB
ArangoDB – A different approach to NoSQL
Introduction to column oriented databases
Jan Steemann: Modelling data in a schema free world (Talk held at Froscon, 2...
An introduction to multi-model databases
MongoDB - A next-generation database that lets you create applications never ...
Complex queries in a distributed multi-model database
Experience with C++11 in ArangoDB
ArangoDB 3.7 Roadmap: Performance at Scale
Ad

Viewers also liked (20)

PDF
Why Plone Will Die
PDF
Why we love ArangoDB. The hunt for the right NosQL Database
PDF
Polyglot Persistence & Multi-Model Databases
PDF
Creating Fault Tolerant Services on Mesos
PDF
NoSQL-Datenbanken am Beispiel CouchDB
PDF
Software + Babies
PDF
Domain driven design @FrOSCon
PDF
Polyglot Persistence & Multi Model-Databases at JMaghreb3.0
PDF
Extensibility of a database api with js
PDF
PDF
Creating data centric microservices
PDF
Microservice-based software architecture
PDF
Polyglot Persistence & Multi-Model Databases (FullStack Toronto)
PDF
Processing large-scale graphs with Google(TM) Pregel
PDF
Performance comparison: Multi-Model vs. MongoDB and Neo4j
PDF
Handling Billions of Edges in a Graph Database
PDF
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
PPT
Optimal Algorithm
PPT
Lru Counter
PPT
Lru Stack
Why Plone Will Die
Why we love ArangoDB. The hunt for the right NosQL Database
Polyglot Persistence & Multi-Model Databases
Creating Fault Tolerant Services on Mesos
NoSQL-Datenbanken am Beispiel CouchDB
Software + Babies
Domain driven design @FrOSCon
Polyglot Persistence & Multi Model-Databases at JMaghreb3.0
Extensibility of a database api with js
Creating data centric microservices
Microservice-based software architecture
Polyglot Persistence & Multi-Model Databases (FullStack Toronto)
Processing large-scale graphs with Google(TM) Pregel
Performance comparison: Multi-Model vs. MongoDB and Neo4j
Handling Billions of Edges in a Graph Database
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
Optimal Algorithm
Lru Counter
Lru Stack
Ad

Similar to Deep dive into the native multi model database ArangoDB (20)

PDF
Oslo bekk2014
PPTX
Technology Stack Discussion
PPTX
Windows Azure - Uma Plataforma para o Desenvolvimento de Aplicações
PPT
I/O & virtualization performance with a search engine based on an xml databa...
PPT
Document Databases & RavenDB
PDF
Big Data, Ingeniería de datos, y Data Lakes en AWS
PDF
Building social and RESTful frameworks
PPT
Scaling Web Apps P Falcone
PDF
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
PDF
Integration Patterns for Big Data Applications
PPTX
Azure for SharePoint Developers - Workshop - Part 3: Web Services
PDF
Fishing Graphs in a Hadoop Data Lake
ODP
Sun Web Server Brief
PPTX
Windows Azure: Lessons From The Field
PPTX
Azure Data Explorer deep dive - review 04.2020
PPTX
Tech-Spark: Exploring the Cosmos DB
PDF
Astroinformatics 2014: Scientific Computing on the Cloud with Amazon Web Serv...
PPTX
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
PPTX
Apache phoenix
PPTX
Elastic search overview
Oslo bekk2014
Technology Stack Discussion
Windows Azure - Uma Plataforma para o Desenvolvimento de Aplicações
I/O & virtualization performance with a search engine based on an xml databa...
Document Databases & RavenDB
Big Data, Ingeniería de datos, y Data Lakes en AWS
Building social and RESTful frameworks
Scaling Web Apps P Falcone
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
Integration Patterns for Big Data Applications
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Fishing Graphs in a Hadoop Data Lake
Sun Web Server Brief
Windows Azure: Lessons From The Field
Azure Data Explorer deep dive - review 04.2020
Tech-Spark: Exploring the Cosmos DB
Astroinformatics 2014: Scientific Computing on the Cloud with Amazon Web Serv...
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
Apache phoenix
Elastic search overview

More from ArangoDB Database (20)

PPTX
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
PPTX
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
PPTX
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
PPTX
ArangoDB 3.9 - Further Powering Graphs at Scale
PDF
GraphSage vs Pinsage #InsideArangoDB
PDF
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
PDF
Graph Analytics with ArangoDB
PDF
Getting Started with ArangoDB Oasis
PDF
Custom Pregel Algorithms in ArangoDB
PPTX
Hacktoberfest 2020 - Intro to Knowledge Graphs
PDF
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
PDF
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
PDF
Webinar: What to expect from ArangoDB Oasis
PDF
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
PDF
3.5 webinar
PDF
An introduction to multi-model databases
PDF
Running complex data queries in a distributed system
PDF
Guacamole Fiesta: What do avocados and databases have in common?
PPTX
Are you a Tortoise or a Hare?
PDF
The Computer Science Behind a modern Distributed Database
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
ArangoDB 3.9 - Further Powering Graphs at Scale
GraphSage vs Pinsage #InsideArangoDB
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
Graph Analytics with ArangoDB
Getting Started with ArangoDB Oasis
Custom Pregel Algorithms in ArangoDB
Hacktoberfest 2020 - Intro to Knowledge Graphs
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
Webinar: What to expect from ArangoDB Oasis
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
3.5 webinar
An introduction to multi-model databases
Running complex data queries in a distributed system
Guacamole Fiesta: What do avocados and databases have in common?
Are you a Tortoise or a Hare?
The Computer Science Behind a modern Distributed Database

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Electronic commerce courselecture one. Pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Modernizing your data center with Dell and AMD
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Cloud computing and distributed systems.
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Electronic commerce courselecture one. Pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Modernizing your data center with Dell and AMD
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Weekly Chronicles - August'25 Week I
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology

Deep dive into the native multi model database ArangoDB

  • 1. Deep dive into the native multi-model database ArangoDB Frank Celler Percona Live 2016, Santa Clara, 20 April 2016 www.arangodb.com
  • 3. is a multi-model Database Features is a document store, a key/value store and a graph database, offers convenient queries (via HTTP/REST and AQL), including joins between different collections, and graph queries, with configurable consistency guarantees using transactions.
  • 4. is a multi-model Database Features is a document store, a key/value store and a graph database, offers convenient queries (via HTTP/REST and AQL), including joins between different collections, and graph queries, with configurable consistency guarantees using transactions. =⇒ Allows polyglot persistence with multiple instances of a single technology.
  • 5. is extensible by JavaScript Code The Foxx Microservice Framework Allows you to extend the HTTP/REST API by your own routes, which you implement in JavaScript running on the database server, with direct access to the C++ DB engine.
  • 6. is extensible by JavaScript Code The Foxx Microservice Framework Allows you to extend the HTTP/REST API by your own routes, which you implement in JavaScript running on the database server, with direct access to the C++ DB engine. Unprecedented possibilities for data centric services: custom-made complex queries or authorizations schema-validation push feeds, etc.
  • 7. is a Data Center Operating System App These days, computing clusters run Data Center Operating Systems.
  • 8. is a Data Center Operating System App These days, computing clusters run Data Center Operating Systems. Idea Distributed applications can be deployed as easily as one installs a mobile app on a phone.
  • 9. is a Data Center Operating System App These days, computing clusters run Data Center Operating Systems. Idea Distributed applications can be deployed as easily as one installs a mobile app on a phone. Cluster resource management is automatic. This leads to significantly better resource utilization. Fault tolerance, self-healing and automatic failover is guaranteed.
  • 11. The Multi-Model Approach Multi-model database A multi-model database combines a document store with a graph database and is at the same time a key/value store, with a common query language for all three data models.
  • 12. The Multi-Model Approach Multi-model database A multi-model database combines a document store with a graph database and is at the same time a key/value store, with a common query language for all three data models. Important: is able to compete with specialised products on their turf allows for polyglot persistence using a single database technology In a microservice architecture, there will be several different deployments.
  • 14. Why is multi-model possible at all? Document stores and key/value stores Document stores: have primary key, are key/value stores. Without using secondary indexes, performance is nearly as good as with opaque data instead of JSON. Good horizontal scalability can be achieved for key lookups.
  • 15. horizontal scalability Experiment: Single document writes (1kB / doc) on cluster of sizes 8 to 80 machi- nes (64 to 640 vCPUs), another 4 to 40 load servers, running on AWS. https://mesosphere.com/blog/2015/11/30/arangodb-benchmark-dcos/
  • 16. Why is multi-model possible at all? Document stores and graph databases Graph database: would like to associate arbitrary data with vertices and edges, so JSON documents are a good choice. A good edge index, giving fast access to neighbours. This can be a secondary index. Graph support in the query language. Implementations of graph algorithms in the DB engine. https://www.arangodb.com/2016/04/ index-free-adjacency-hybrid-indexes-graph-databases/
  • 17. Replication and Sharding ArangoDB provides (Version 2.8, January 2016) Sharding with automatic data distribution, easy setup of (asynchronous) replication (cluster and single), fault tolerance by automatic failover, full integration with Apache Mesos and Mesosphere DC/OS.
  • 18. Replication and Sharding ArangoDB provides (Version 2.8, January 2016) Sharding with automatic data distribution, easy setup of (asynchronous) replication (cluster and single), fault tolerance by automatic failover, full integration with Apache Mesos and Mesosphere DC/OS. Work in progress (Version 3.0, RC in April 2016): synchronous replication in cluster mode, zero administration by a self-repairing and self-balancing cluster architecture.
  • 19. Data-Center Operating Systems Resource Management Installation should be as easy as possible integration into the resource management of data-center gives better resource utilisation, full integration with Apache Mesos and Mesosphere DC/OS
  • 20. Data-Center Operating Systems Resource Management Installation should be as easy as possible integration into the resource management of data-center gives better resource utilisation, full integration with Apache Mesos and Mesosphere DC/OS Work in progress Mesosphere DC/OS a very mature, Open-Source solution later this year integration also for Kubernetes, Docker-Swarm
  • 24. Powerful query language AQL The built in Arango Query Language allows complex, powerful and convenient queries, with transaction semantics, allowing to do joins, AQL is independent of the driver used and offers protection against injections by design.
  • 25. Extensible through JavaScript The Foxx Microservice Framework Allows you to extend the HTTP/REST API by your own routes, which you implement in JavaScript running on the database server, with direct access to the C++ DB engine.
  • 26. Extensible through JavaScript The Foxx Microservice Framework Allows you to extend the HTTP/REST API by your own routes, which you implement in JavaScript running on the database server, with direct access to the C++ DB engine. Unprecedented possibilities for data centric services: complex queries or authorizations, schema-validation, push feeds, etc. easy deployment via web interface or REST API, automatic API description through Swagger =⇒ discoverability of services.
  • 28. Use case: Aircraft fleet management
  • 29. Use case: Aircraft fleet management One of our customers uses ArangoDB to store each part, component, unit or aircraft as a document model containment as a graph thus can easily find all parts of some component keep track of maintenance intervals perform queries orthogonal to the graph structure thereby getting good efficiency for all needed queries http://radar.oreilly.com/2015/07/ data-modeling-with-multi-model-databases.html
  • 30. Use case: rights management
  • 31. Use case: rights management Right managements in relational model is hard: looks like a forest at first then exceptions pop-up one company sub-contracts another for a special station an engineer works for two companies some-one needs special permissions when being a proxy much easier expressed as graph structure
  • 33. Use case: e-commerce AboutYou uses ArangoDB to create channels showing new products allow recommendation to friends celebrities presenting new fashion blog about fashion products nightly business analysis news stream https://www.arangodb.com/case-studies/ aboutyou-data-driven-personalization-with-arangodb/
  • 35. First deployment: a simple key/value store A key/value store One collection “data”, indexes on “value” (sorted) and “name” (hash). Single document requests Indexes possible Range queries possible
  • 36. Second deployment: a Microservice as a Foxx app A Foxx Microservice Simple TODO app, deployed from app store with web UI. REST/JSON API available Swagger generates API description automatically
  • 37. Third deployment: a single server graph database A Graph Database Graph “worldCountry” with vertex collection “worldVertex” and edge collection “worldEdges”, links from cities to countries to continents to world. Show some graph traversals. Show graph viewer.
  • 38. Fourth deployment: a multi-model application A multi-model database Some data from a web shop. Show some queries.
  • 40. Life of a query Text and query parameters come from user
  • 41. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST)
  • 42. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters
  • 43. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc.
  • 44. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP)
  • 45. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs
  • 46. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs Reason about distribution in cluster
  • 47. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs Reason about distribution in cluster Optimise distributed EXPs
  • 48. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs Reason about distribution in cluster Optimise distributed EXPs Estimate costs for all EXPs, and sort by ascending cost
  • 49. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs Reason about distribution in cluster Optimise distributed EXPs Estimate costs for all EXPs, and sort by ascending cost Instanciate “cheapest” plan, i.e. set up execution engine
  • 50. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs Reason about distribution in cluster Optimise distributed EXPs Estimate costs for all EXPs, and sort by ascending cost Instanciate “cheapest” plan, i.e. set up execution engine Distribute and link up engines on different servers
  • 51. Life of a query Text and query parameters come from user Parse text, produce abstract syntax tree (AST) Substitute query parameters First optimisation: constant expressions, etc. Translate AST into an execution plan (EXP) Optimise one EXP, produce many, potentially better EXPs Reason about distribution in cluster Optimise distributed EXPs Estimate costs for all EXPs, and sort by ascending cost Instanciate “cheapest” plan, i.e. set up execution engine Distribute and link up engines on different servers Execute plan, provide cursor API
  • 52. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x Query → EXP
  • 53. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x Query → EXP Black arrows are dependencies
  • 54. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x Query → EXP Black arrows are dependencies Think of a pipeline
  • 55. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x Query → EXP Black arrows are dependencies Think of a pipeline Each node provides a cursor API
  • 56. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x Query → EXP Black arrows are dependencies Think of a pipeline Each node provides a cursor API Blocks of “Items” travel through the pipeline
  • 57. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x Query → EXP Black arrows are dependencies Think of a pipeline Each node provides a cursor API Blocks of “Items” travel through the pipeline What is an “item”???
  • 58. Pipeline and items FOR a IN collA EnumerateCollection a EnumerateCollection b Singleton Calculation xx FOR b IN collB LET xx = a.x Items have vars a, xx Items have no vars Items are the thingies traveling through the pipeline.
  • 59. Pipeline and items FOR a IN collA EnumerateCollection a EnumerateCollection b Singleton Calculation xx FOR b IN collB LET xx = a.x Items have vars a, xx Items have no vars Items are the thingies traveling through the pipeline. An item holds values of those variables in the current frame
  • 60. Pipeline and items FOR a IN collA EnumerateCollection a EnumerateCollection b Singleton Calculation xx FOR b IN collB LET xx = a.x Items have vars a, xx Items have no vars Items are the thingies traveling through the pipeline. An item holds values of those variables in the current frame Thus: Items look differently in different parts of the plan
  • 61. Pipeline and items FOR a IN collA EnumerateCollection a EnumerateCollection b Singleton Calculation xx FOR b IN collB LET xx = a.x Items have vars a, xx Items have no vars Items are the thingies traveling through the pipeline. An item holds values of those variables in the current frame Thus: Items look differently in different parts of the plan We always deal with blocks of items for performance reasons
  • 62. Execution plans FOR a IN collA RETURN {x: a.x, z: b.z} EnumerateCollection a EnumerateCollection b Calculation xx == b.y Filter xx == b.y Singleton Calculation xx Return {x: a.x, z: b.z} Calc {x: a.x, z: b.z} FILTER xx == b.y FOR b IN collB LET xx = a.x
  • 63. Move filters up FOR a IN collA FOR b IN collB FILTER a.x == 10 FILTER a.u == b.v RETURN {u:a.u,w:b.w} Singleton EnumColl a EnumColl b Calc a.x == 10 Return {u:a.u,w:b.w} Filter a.u == b.v Calc a.u == b.v Filter a.x == 10
  • 64. Move filters up FOR a IN collA FOR b IN collB FILTER a.x == 10 FILTER a.u == b.v RETURN {u:a.u,w:b.w} The result and behaviour does not change, if the first FILTER is pulled out of the inner FOR. Singleton EnumColl a EnumColl b Calc a.x == 10 Return {u:a.u,w:b.w} Filter a.u == b.v Calc a.u == b.v Filter a.x == 10
  • 65. Move filters up FOR a IN collA FILTER a.x < 10 FOR b IN collB FILTER a.u == b.v RETURN {u:a.u,w:b.w} The result and behaviour does not change, if the first FILTER is pulled out of the inner FOR. However, the number of items trave- ling in the pipeline is decreased. Singleton EnumColl a Return {u:a.u,w:b.w} Filter a.u == b.v Calc a.u == b.v Calc a.x == 10 EnumColl b Filter a.x == 10
  • 66. Move filters up FOR a IN collA FILTER a.x < 10 FOR b IN collB FILTER a.u == b.v RETURN {u:a.u,w:b.w} The result and behaviour does not change, if the first FILTER is pulled out of the inner FOR. However, the number of items trave- ling in the pipeline is decreased. Note that the two FOR statements could be interchanged! Singleton EnumColl a Return {u:a.u,w:b.w} Filter a.u == b.v Calc a.u == b.v Calc a.x == 10 EnumColl b Filter a.x == 10
  • 67. Remove unnecessary calculations FOR a IN collA LET L = LENGTH(a.hobbies) FOR b IN collB FILTER a.u == b.v RETURN {h:a.hobbies,w:b.w} Singleton EnumColl a Calc L = ... EnumColl b Calc a.u == b.v Filter a.u == b.v Return {...}
  • 68. Remove unnecessary calculations FOR a IN collA LET L = LENGTH(a.hobbies) FOR b IN collB FILTER a.u == b.v RETURN {h:a.hobbies,w:b.w} The Calculation of L is unnecessary! Singleton EnumColl a Calc L = ... EnumColl b Calc a.u == b.v Filter a.u == b.v Return {...}
  • 69. Remove unnecessary calculations FOR a IN collA FOR b IN collB FILTER a.u == b.v RETURN {h:a.hobbies,w:b.w} The Calculation of L is unnecessary! (since it cannot throw an exception). Singleton EnumColl a EnumColl b Calc a.u == b.v Filter a.u == b.v Return {...}
  • 70. Remove unnecessary calculations FOR a IN collA FOR b IN collB FILTER a.u == b.v RETURN {h:a.hobbies,w:b.w} The Calculation of L is unnecessary! (since it cannot throw an exception). Therefore we can just leave it out. Singleton EnumColl a EnumColl b Calc a.u == b.v Filter a.u == b.v Return {...}
  • 71. Use index for FILTER and SORT FOR a IN collA FILTER a.x > 17 && a.x <= 23 && a.y == 10 SORT a.y, a.x RETURN a Singleton EnumColl a Filter ... Calc ... Sort a.y, a.x Return a
  • 72. Use index for FILTER and SORT FOR a IN collA FILTER a.x > 17 && a.x <= 23 && a.y == 10 SORT a.y, a.x RETURN a Assume collA has a skiplist index on “y” and “x” (in this order), Singleton EnumColl a Filter ... Calc ... Sort a.y, a.x Return a
  • 73. Use index for FILTER and SORT FOR a IN collA FILTER a.x > 17 && a.x <= 23 && a.y == 10 SORT a.y, a.x RETURN a Assume collA has a skiplist index on “y” and “x” (in this order), then we can read off the half-open interval between { y: 10, x: 17 } and { y: 10, x: 23 } from the skiplist index. Singleton Sort a.y, a.x Return a IndexRange a
  • 74. Use index for FILTER and SORT FOR a IN collA FILTER a.x > 17 && a.x <= 23 && a.y == 10 SORT a.y, a.x RETURN a Assume collA has a skiplist index on “y” and “x” (in this order), then we can read off the half-open interval between { y: 10, x: 17 } and { y: 10, x: 23 } from the skiplist index. The result will automatically be sorted by y and then by x. Singleton Return a IndexRange a
  • 75. Data distribution in a cluster Requests DBserver DBserver DBserver CoordinatorCoordinator 4 2 5 3 11 The shards of a collection are distributed across the DB servers.
  • 76. Data distribution in a cluster Requests DBserver DBserver DBserver CoordinatorCoordinator 4 2 5 3 11 The shards of a collection are distributed across the DB servers. The coordinators receive queries and organise their execution