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
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
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