Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Distributed 
DBMS
Short history 
! 
In 2012, we had a Master/Slave replication 
! 
While it scaled up well on reads, users 
complained of a ...
How Master/Slave works 
Copyright (c) - Orient Technologies LTD 
3 
C C C 
Master 
Node 
Slave 
Node 
Slave 
Node 
Writes ...
Master/Slave 
! 
PROS: 
- Relatively easy to develop 
! 
CONS: 
- The master is the bottleneck for writes 
- No matter how...
What happened to OrientDB's M/S architecture? 
This is the old 
MASTER/SLAVE 
replication 
Copyright (c) - Orient Technolo...
2012: new architectural goals 
Multi-Master: all the nodes must accept writes 
Sharding: split data in multiple partitions...
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 ...
Auto-reconnect in case of failure 
In case of failure, the 
clients auto-reconnect to 
C C 
the available nodes 
Master 
N...
Auto-deploy of databases 
automatically deployed 
C 
to the new joining 
Master 
Node 
C 
Master 
Node 
DB are 
nodes 
C 
...
Classes rely on Cluster to store records 
1 class -> 1 cluster Class 
Customer 
customer 
By default 
Cluster 
Copyright (...
Classes can be split into more clusters 
Customer 
customer_usa 
Class 
multiple clusters 
and assign them to 
customer_ch...
Assign 1 cluster per Node 
Master 
Node 
Customer 
Master 
Node 
Master 
Node 
customer_usa customer_europe customer_china...
Copyright (c) - Orient Technologies LTD 
What about 
sharing + replication? 
! 
We used a solution similar 
to RAID for Ha...
RAID for databases 
Replica 
factor = 2 
Master 
Node 
Customer 
Master 
Node 
Master 
Node 
customer_usa customer_europe ...
RAID for databases 
Replica 
factor = 3 
Master 
Node 
Master 
Node 
Each node 
owns all customers 
Master 
Node 
customer...
Replication: under the hood 
Client sends an INSERT request 
HZ 
Queue 
Requests 
Master 
Node 
HZ 
Queue 
Master 
Node 
H...
Replication: under the hood 
HZ 
Queue 
Response handling 
Requests 
Master 
Node 
HZ 
Queue 
Master 
Node 
HZ 
Queue 
Wri...
Replication: under the hood 
Fix the unaligned node 
HZ 
Queue 
Requests 
Master 
Node 
HZ 
Queue 
Master 
Node 
HZ 
Queue...
Linear and Elastic scalability 
C 
Master 
Node 
C 
on both read & writes! 
Master 
Node 
C 
C 
Master 
Node 
C 
C 
C 
C 
...
Hazelcast’s role 
Auto-Discovering (Multicast/TCP-IP/Amazon) 
Queues for requests and responses 
Store metadata in distrib...
OrientDB’s Future Roadmap 
OrientDB 2.0 (Sept 2014) has even better 
performance: +300% improvement on all the 
distribute...
Upcoming SlideShare
Loading in …5
×

OrientDB Distributed Architecture v2.0

79,007 views

Published on

OrientDB Distributed Architecture Overview

Published in: Technology
  • Dating direct: ❶❶❶ http://bit.ly/39pMlLF ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/39pMlLF ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area is here: ♥♥♥ http://bit.ly/2Y8gKsI ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2Y8gKsI ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

OrientDB Distributed Architecture v2.0

  1. 1. Distributed DBMS
  2. 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. 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. 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. 5. What happened to OrientDB's M/S architecture? This is the old MASTER/SLAVE replication Copyright (c) - Orient Technologies LTD 5
  6. 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. 7. Auto-Discovery C Master Node I’m the only one! Copyright (c) - Orient Technologies LTD 7
  8. 8. Auto-Discovery Connected! C Master Node Master Node Copyright (c) - Orient Technologies LTD 8
  9. 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. 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. 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. 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. 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. 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. 15. Copyright (c) - Orient Technologies LTD What about sharing + replication? ! We used a solution similar to RAID for HardDrives 15
  16. 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. 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. 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. 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. 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. 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. 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. 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

×