SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Distributed 
DBMS
Short history 
! 
In 2012, we had a Master/Slave replication 
! 
While it scaled up well on reads, users 
complained of a single Master node 
bottleneck 
It’s quite easy to scale up reads, the hard 
part is to scale up both reads and writes 
Copyright (c) - Orient Technologies LTD 2
How Master/Slave works 
Copyright (c) - Orient Technologies LTD 
3 
C C C 
Master 
Node 
Slave 
Node 
Slave 
Node 
Writes 
Master 
node is the 
bottleneck
Master/Slave 
! 
PROS: 
- Relatively easy to develop 
! 
CONS: 
- The master is the bottleneck for writes 
- No matter how many servers you have, the 
throughput is limited by the Master node 
Copyright (c) - Orient Technologies LTD 4
What happened to OrientDB's M/S architecture? 
This is the old 
MASTER/SLAVE 
replication 
Copyright (c) - Orient Technologies LTD 5
2012: new architectural goals 
Multi-Master: all the nodes must accept writes 
Sharding: split data in multiple partitions 
Better Fail-Over 
Simplified configuration with Auto-Discovery 
Copyright (c) - Orient Technologies LTD 6
Auto-Discovery 
C 
Master 
Node 
I’m the 
only one! 
Copyright (c) - Orient Technologies LTD 7
Auto-Discovery 
Connected! 
C 
Master 
Node 
Master 
Node 
Copyright (c) - Orient Technologies LTD 8
Clients see the distributed configuration 
C 
Master 
Node 
updated distributed 
configuration is broadcasted to 
all the connected clients 
Master 
Node 
Copyright (c) - Orient Technologies LTD 9
Auto-reconnect in case of failure 
In case of failure, the 
clients auto-reconnect to 
C C 
the available nodes 
Master 
Node 
Master 
Node 
Copyright (c) - Orient Technologies LTD 10
Auto-deploy of databases 
automatically deployed 
C 
to the new joining 
Master 
Node 
C 
Master 
Node 
DB are 
nodes 
C 
C 
DB DB 
Copyright (c) - Orient Technologies LTD 11
Classes rely on Cluster to store records 
1 class -> 1 cluster Class 
Customer 
customer 
By default 
Cluster 
Copyright (c) - Orient Technologies LTD 12
Classes can be split into more clusters 
Customer 
customer_usa 
Class 
multiple clusters 
and assign them to 
customer_china 
Define 
each node 
Cluster Cluster 
customer_europe 
Cluster 
Copyright (c) - Orient Technologies LTD 13
Assign 1 cluster per Node 
Master 
Node 
Customer 
Master 
Node 
Master 
Node 
customer_usa customer_europe customer_china 
Copyright (c) - Orient Technologies LTD 14
Copyright (c) - Orient Technologies LTD 
What about 
sharing + replication? 
! 
We used a solution similar 
to RAID for HardDrives 
15
RAID for databases 
Replica 
factor = 2 
Master 
Node 
Customer 
Master 
Node 
Master 
Node 
customer_usa customer_europe customer_china 
customer_china customer_usa customer_europe 
Copyright (c) - Orient Technologies LTD 16
RAID for databases 
Replica 
factor = 3 
Master 
Node 
Master 
Node 
Each node 
owns all customers 
Master 
Node 
customer_usa customer_europe customer_china 
customer_customer_china usa customer_europe 
customer_europe customer_china customer_usa 
Copyright (c) - Orient Technologies LTD 17
Replication: under the hood 
Client sends an INSERT request 
HZ 
Queue 
Requests 
Master 
Node 
HZ 
Queue 
Master 
Node 
HZ 
Queue 
Master 
Node 
C 
INSERT 
Copyright (c) - Orient Technologies LTD 18
Replication: under the hood 
HZ 
Queue 
Response handling 
Requests 
Master 
Node 
HZ 
Queue 
Master 
Node 
HZ 
Queue 
WriteQuorum 
= 2 
Sends OK 
Master 
Node 
C 
HZ 
Queue 
HZ 
Queue 
HZ 
Queue 
OK 
Responses 
Copyright (c) - Orient Technologies LTD 19
Replication: under the hood 
Fix the unaligned node 
HZ 
Queue 
Requests 
Master 
Node 
HZ 
Queue 
Master 
Node 
HZ 
Queue 
Master 
Node 
HZ 
Queue 
HZ 
Queue 
HZ 
Queue 
Responses 
Fix 
Copyright (c) - Orient Technologies LTD 20
Linear and Elastic scalability 
C 
Master 
Node 
C 
on both read & writes! 
Master 
Node 
C 
C 
Master 
Node 
C 
C 
C 
C 
Master 
Node 
C 
C 
C 
C Master 
Node 
C 
C 
C 
Master 
Node 
C 
C 
C 
Master 
Node 
C 
C 
Copyright (c) - Orient Technologies LTD 21
Hazelcast’s role 
Auto-Discovering (Multicast/TCP-IP/Amazon) 
Queues for requests and responses 
Store metadata in distributed Maps 
Distributed Locks 
Copyright (c) - Orient Technologies LTD 22
OrientDB’s Future Roadmap 
OrientDB 2.0 (Sept 2014) has even better 
performance: +300% improvement on all the 
distributed operations 
Pluggable conflict resolution strategy 
Auto-discovery also by Clients 
Copyright (c) - Orient Technologies LTD 23

Weitere ähnliche Inhalte

Was ist angesagt?

Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 
Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach
Neo4j
 

Was ist angesagt? (20)

Polyglot Persistence - Two Great Tastes That Taste Great Together
Polyglot Persistence - Two Great Tastes That Taste Great TogetherPolyglot Persistence - Two Great Tastes That Taste Great Together
Polyglot Persistence - Two Great Tastes That Taste Great Together
 
Tutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksTutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial Networks
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
Introduction to Cypher
Introduction to Cypher Introduction to Cypher
Introduction to Cypher
 
Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach Training Week: Create a Knowledge Graph: A Simple ML Approach
Training Week: Create a Knowledge Graph: A Simple ML Approach
 
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdfDeep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
 
Quand utiliser MongoDB … Et quand vous en passer…
Quand utiliser MongoDB	… Et quand vous en passer…Quand utiliser MongoDB	… Et quand vous en passer…
Quand utiliser MongoDB … Et quand vous en passer…
 
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
Leveraging Graphs for Artificial Intelligence and Machine Learning - Phani Da...
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
ontop: A tutorial
ontop: A tutorialontop: A tutorial
ontop: A tutorial
 
Introduction to HiveQL
Introduction to HiveQLIntroduction to HiveQL
Introduction to HiveQL
 
MapReduce
MapReduceMapReduce
MapReduce
 
Getting the Scylla Shard-Aware Drivers Faster
Getting the Scylla Shard-Aware Drivers FasterGetting the Scylla Shard-Aware Drivers Faster
Getting the Scylla Shard-Aware Drivers Faster
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 
Getting Started with Knowledge Graphs
Getting Started with Knowledge GraphsGetting Started with Knowledge Graphs
Getting Started with Knowledge Graphs
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
 
Graph and RDF databases
Graph and RDF databasesGraph and RDF databases
Graph and RDF databases
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
 

Ähnlich wie OrientDB Distributed Architecture v2.0

Deview 2013 rise of the wimpy machines - john mao
Deview 2013   rise of the wimpy machines - john maoDeview 2013   rise of the wimpy machines - john mao
Deview 2013 rise of the wimpy machines - john mao
NAVER D2
 

Ähnlich wie OrientDB Distributed Architecture v2.0 (20)

OrientDB and Hazelcast
OrientDB and HazelcastOrientDB and Hazelcast
OrientDB and Hazelcast
 
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 OrientDB & Hazelcast: In-Memory Distributed Graph Database OrientDB & Hazelcast: In-Memory Distributed Graph Database
OrientDB & Hazelcast: In-Memory Distributed Graph Database
 
Scale Out Your Graph Across Servers and Clouds with OrientDB
Scale Out Your Graph Across Servers and Clouds  with OrientDBScale Out Your Graph Across Servers and Clouds  with OrientDB
Scale Out Your Graph Across Servers and Clouds with OrientDB
 
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like systemAccelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
 
Best Practices for Building Open Source Data Layers
Best Practices for Building Open Source Data LayersBest Practices for Building Open Source Data Layers
Best Practices for Building Open Source Data Layers
 
352-001-Exam-ADVDESIGN
352-001-Exam-ADVDESIGN352-001-Exam-ADVDESIGN
352-001-Exam-ADVDESIGN
 
ScaleIO : capitalisez sur vos infrastructures existantes avec une solution so...
ScaleIO : capitalisez sur vos infrastructures existantes avec une solution so...ScaleIO : capitalisez sur vos infrastructures existantes avec une solution so...
ScaleIO : capitalisez sur vos infrastructures existantes avec une solution so...
 
Best practices for long-term support and security of the device-tree
Best practices for long-term support and security of the device-treeBest practices for long-term support and security of the device-tree
Best practices for long-term support and security of the device-tree
 
OpenSlava Infrastructure Automation Patterns
OpenSlava   Infrastructure Automation PatternsOpenSlava   Infrastructure Automation Patterns
OpenSlava Infrastructure Automation Patterns
 
Introduction to IBM Shared Memory Communications Version 2 (SMCv2) and SMC-Dv2
Introduction to IBM Shared Memory Communications Version 2 (SMCv2) and SMC-Dv2Introduction to IBM Shared Memory Communications Version 2 (SMCv2) and SMC-Dv2
Introduction to IBM Shared Memory Communications Version 2 (SMCv2) and SMC-Dv2
 
EMC ScaleIO Overview
EMC ScaleIO OverviewEMC ScaleIO Overview
EMC ScaleIO Overview
 
Deview 2013 rise of the wimpy machines - john mao
Deview 2013   rise of the wimpy machines - john maoDeview 2013   rise of the wimpy machines - john mao
Deview 2013 rise of the wimpy machines - john mao
 
Drbd9 and drbdmanage_june_2016
Drbd9 and drbdmanage_june_2016Drbd9 and drbdmanage_june_2016
Drbd9 and drbdmanage_june_2016
 
AWS Meetup Paris - Short URL project by Pernod Ricard
AWS Meetup Paris - Short URL project by Pernod RicardAWS Meetup Paris - Short URL project by Pernod Ricard
AWS Meetup Paris - Short URL project by Pernod Ricard
 
Xiv svc best practices - march 2013
Xiv   svc best practices - march 2013Xiv   svc best practices - march 2013
Xiv svc best practices - march 2013
 
200-301-demo.pdf
200-301-demo.pdf200-301-demo.pdf
200-301-demo.pdf
 
Cisco 200-301 Exam Dumps
Cisco 200-301 Exam DumpsCisco 200-301 Exam Dumps
Cisco 200-301 Exam Dumps
 
Cisco 200-301 Exam Dumps
Cisco 200-301 Exam DumpsCisco 200-301 Exam Dumps
Cisco 200-301 Exam Dumps
 
Massively Parallel RISC-V Processing with Transactional Memory
Massively Parallel RISC-V Processing with Transactional MemoryMassively Parallel RISC-V Processing with Transactional Memory
Massively Parallel RISC-V Processing with Transactional Memory
 
GumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWSGumGum: Multi-Region Cassandra in AWS
GumGum: Multi-Region Cassandra in AWS
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

OrientDB Distributed Architecture v2.0

  • 2. Short history ! In 2012, we had a Master/Slave replication ! While it scaled up well on reads, users complained of a single Master node bottleneck It’s quite easy to scale up reads, the hard part is to scale up both reads and writes Copyright (c) - Orient Technologies LTD 2
  • 3. How Master/Slave works Copyright (c) - Orient Technologies LTD 3 C C C Master Node Slave Node Slave Node Writes Master node is the bottleneck
  • 4. Master/Slave ! PROS: - Relatively easy to develop ! CONS: - The master is the bottleneck for writes - No matter how many servers you have, the throughput is limited by the Master node Copyright (c) - Orient Technologies LTD 4
  • 5. What happened to OrientDB's M/S architecture? This is the old MASTER/SLAVE replication Copyright (c) - Orient Technologies LTD 5
  • 6. 2012: new architectural goals Multi-Master: all the nodes must accept writes Sharding: split data in multiple partitions Better Fail-Over Simplified configuration with Auto-Discovery Copyright (c) - Orient Technologies LTD 6
  • 7. Auto-Discovery C Master Node I’m the only one! Copyright (c) - Orient Technologies LTD 7
  • 8. Auto-Discovery Connected! C Master Node Master Node Copyright (c) - Orient Technologies LTD 8
  • 9. Clients see the distributed configuration C Master Node updated distributed configuration is broadcasted to all the connected clients Master Node Copyright (c) - Orient Technologies LTD 9
  • 10. Auto-reconnect in case of failure In case of failure, the clients auto-reconnect to C C the available nodes Master Node Master Node Copyright (c) - Orient Technologies LTD 10
  • 11. Auto-deploy of databases automatically deployed C to the new joining Master Node C Master Node DB are nodes C C DB DB Copyright (c) - Orient Technologies LTD 11
  • 12. Classes rely on Cluster to store records 1 class -> 1 cluster Class Customer customer By default Cluster Copyright (c) - Orient Technologies LTD 12
  • 13. Classes can be split into more clusters Customer customer_usa Class multiple clusters and assign them to customer_china Define each node Cluster Cluster customer_europe Cluster Copyright (c) - Orient Technologies LTD 13
  • 14. Assign 1 cluster per Node Master Node Customer Master Node Master Node customer_usa customer_europe customer_china Copyright (c) - Orient Technologies LTD 14
  • 15. Copyright (c) - Orient Technologies LTD What about sharing + replication? ! We used a solution similar to RAID for HardDrives 15
  • 16. RAID for databases Replica factor = 2 Master Node Customer Master Node Master Node customer_usa customer_europe customer_china customer_china customer_usa customer_europe Copyright (c) - Orient Technologies LTD 16
  • 17. RAID for databases Replica factor = 3 Master Node Master Node Each node owns all customers Master Node customer_usa customer_europe customer_china customer_customer_china usa customer_europe customer_europe customer_china customer_usa Copyright (c) - Orient Technologies LTD 17
  • 18. Replication: under the hood Client sends an INSERT request HZ Queue Requests Master Node HZ Queue Master Node HZ Queue Master Node C INSERT Copyright (c) - Orient Technologies LTD 18
  • 19. Replication: under the hood HZ Queue Response handling Requests Master Node HZ Queue Master Node HZ Queue WriteQuorum = 2 Sends OK Master Node C HZ Queue HZ Queue HZ Queue OK Responses Copyright (c) - Orient Technologies LTD 19
  • 20. Replication: under the hood Fix the unaligned node HZ Queue Requests Master Node HZ Queue Master Node HZ Queue Master Node HZ Queue HZ Queue HZ Queue Responses Fix Copyright (c) - Orient Technologies LTD 20
  • 21. Linear and Elastic scalability C Master Node C on both read & writes! Master Node C C Master Node C C C C Master Node C C C C Master Node C C C Master Node C C C Master Node C C Copyright (c) - Orient Technologies LTD 21
  • 22. Hazelcast’s role Auto-Discovering (Multicast/TCP-IP/Amazon) Queues for requests and responses Store metadata in distributed Maps Distributed Locks Copyright (c) - Orient Technologies LTD 22
  • 23. OrientDB’s Future Roadmap OrientDB 2.0 (Sept 2014) has even better performance: +300% improvement on all the distributed operations Pluggable conflict resolution strategy Auto-discovery also by Clients Copyright (c) - Orient Technologies LTD 23