SlideShare a Scribd company logo
1 of 68
MD-SAL Clustering Internals
Moiz Raja, Technical Lead, Cisco Systems
IRC: moizer
#ODSummit
▪ Abhishek Kumar
▪ Basheeruddin Ahmed
▪ Colin Dixon
▪ Harman Singh
▪ Kamal Rameshan
▪ Robert Varga
▪ Tony Tkacik
My Collaborators
3
Tom Pantelis
▪ Luis Gomez
▪ Phillip Shea
▪ Radhika Hirannaiah
▪ and many more…
▪ Architecture
▪ Modules
▪ Flows
▪ Diagnostics
▪ Questions
Agenda
#ODSummit
Architecture
Subsystems
6
member-1
member-2
member-3
Distributed Data Store
member-1 member-2
Remote RPC Connector
High Level Architecture
Distributed Data Store Remote RPC Connector
Persistence Remoting Clustering
Actor Systems
8
Distributed Data Store Remote RPC Connector
Actor
Hierarchy
Configuration
Dispatchers
Data Synchronization
9
Data store
Synchronized Data Tree
Raft for Distributed Consensus
Remote RPC
Synchronized RPC Registry
Gossip for data distribution
#ODSummit
Distributed Data Store Architecture
Accessing Remote Data
11
Client
member-1 member-2
Location Transparency
12
Client
member-1 member-2
DistributedDataStore
DistributedDataStore
13
DOMStore
DistributedDataStore
Communication
14
Client
member-1 member-2
DistributedDataStore
Shard
Data Distribution
15
Client
member-1
DistributedDataStore
member-2
member-3
topology
inventory
Module Based Shards
16
/
/inventory /topology /toaster
HA
17
member-2
member-3
inventory – follower -1
inventory – follower - 2
Client
member-1
DistributedDataStore
inventory – leader
Raft Distributed Consensus
18
discoversnodewithhigherterm
Follower
Candidate
Leader
starts up/
recovers
times out,
starts elections
receives votes
from majority
of nodes
times out,
restarts elections
follower-2follower-1
leader
Election Replication/Consensus
Journal replication
19
leader
follower-1
follower-2
transaction-1
transaction-2
transaction-3
transaction-4
transaction-1
transaction-2
transaction-3
transaction-4
transaction-1
transaction-2
transaction-3
transaction-4
Snapshot Replication
20
leader
follower-1
follower-2
Durability/Recovery
21
Journal
Snapshots
#ODSummit
Remote RPC Architecture
Invoking a Remote RPC
23
Consumer
member-1 member-2
Provider
Location Transparency
24
Consumer
member-1 member-2
Provider
RpcProviderProxy
RemoteRpcBroker
RPC Registry
25
Provider
RPC
Registration
Listener
RPC Registry
RPC Registry Replication - Gossip
26
version=1
version=2
modify
change
version
Local bucket updates
change version
m1,v1
m2,v5
m3,v7
All buckets and their
versions known to all
members
Every 1 second members
send all known bucket
versions to any one peer
m1
m2 m3status
m2 m3
m1
local versions higher – send update
local versions lower – send status to sender
#ODSummit
Modules
Modules
28
sal-clustering-commons
sal-akka-raft sal-remoterpc-connector
sal-distributed-datastore
sal-clustering-config
sal-akka-raft-example
sal-dummy-distributed-datastore
clustering-test-app
▪ Some common messages
▪ Actor base classes
▪ The Protobuf messages used in Helium
▪ The Protobuf NormalizedNode serialization code
▪ The NormalizedNode streaming code
▪ Other miscellaneous utility classes
sal-clustering-commons
29
▪ Implementation of the Raft Algorithm on top of akka
▪ Uses akka-persistence for durability
▪ Provides a base class called RaftActor which when can be extended
by anyone who wants to replicate state
▪ See sal-akka-raft-example which provides a simple implementation of
a replicated HashMap
sal-akka-raft
30
▪ ConcurrentDOMDataBroker
▪ DistributedDataStore
▪ Implementation of the DOMStore SPI
▪ Shard built on top of RaftActor
▪ Creates Shards based on Sharding strategy
▪ Code for a client to interact with the Shard Leader
sal-distributed-datastore
31
▪ RemoteRpcProvider
▪ Default RPC Provider. Invoked when an RPC is not found in the local
MD-SAL registry.
▪ Code for BucketStore which provides a mechanism to replicate state
based on Gossip
▪ Code for RpcBroker which allows invoking a remote rpc
sal-remoterpc-connector
32
#ODSummit
Data Store Flows
Startup
34
DistributedConfigDataStoreProviderModule
DistributedDataStore
ShardManager
Shard1 Shard Shard3 Shard4
createInstance
ActorContextwaitTillReadyLatch
create & waitTillReady
Recovery
35
Shard1 Shard Shard3 Shard4
ShardManager
read last known state from disk
ready
waitTillReadyLatch
countDown
▪ Recovery must be complete
▪ All Shard Leaders must be known
▪ Three messages are monitored by ShardManager
▪Cluster.MemberStatusUp
▪Used to figure out the address of a cluster member
▪LeaderStateChanged
▪Used to figure out if a Follower has a different Leader
▪ShardRoleChanged
▪Use to figured out any changes in a Shard’s Role
▪ Waiting is not infinite, by default it lasts only 90 seconds but is
configurable
▪ Will block config sub-system
Waiting for Ready
36
Creating a Transaction
37
DistributedDataStore
newReadWriteTransaction
TransactionProxy
create
First Operation
38
ActorContext.findPrimary
PrimaryCache.lookup/ShardManager.findP
rimary
Found?
LocalTransactionContextRemoteTransactionContext
NoOpTransactionContext
TransactionProxy
write(“inventory”, node)
Local?
N
Y
N Y
Transactions
39
Client
DistributedDataStore
inventory – leader
Client
DistributedDataStore
inventory – leader
Local Transaction Remote Transaction
member-1
member-1member-2
Local Transaction Optimization
40
LocalTransactionContext Shard - Leader
write
merge
delete
ready
member-1
Remote Transaction Optimization
41
RemoteTransactionContext Shard Leader
write
merge
delete
ready
write mod
merge mod
delete mod
member-1 member-2
Transaction Rate Limiting
42
rate-limit = 100 Tx/Sec
Tx
Cohort
Shard Leader
member-2
20ms
Tx
Cohort
50ms
Tx
Cohort
15ms
after rate-limit/2 transactions done….
new-rate-limit = 25 Tx/Sec
Operation Limiting
43
RemoteTransactionContext Shard Leader
write
merge
delete
write mod
merge mod
delete mod
member-1 member-2
…
…
block
Commit Coordination
44
Shard Leader
member-2
Shard
CommitCoordinator
Tx1 - ready
Tx2 - ready
Tx3 - ready
Tx1 - commit
Tx3 - commit
Tx3 - abort
Tx2 - commit
Tx1
Tx2
Tx3
Managing the in-memory journal
Replicated To All
45
Client leader
follower-1 follower-2
commit transaction
txn
txn txn
Managing the in-memory journal
Cluster member unavailable
46
Client leader
follower-1
commit transaction
txn
txn
txn
txn
txn
txn
txn
txn
Data Change Notifications
47
Client leader
follower-1 follower-2
commit transaction
txn
txn txn
notify
#ODSummit
RPC Connector Flows
Startup
49
RemoteRpcBrokerModule
createInstance
RpcManager
RemoteRpcProvider
RpcBroker RpcRegistry RemoteRpcImpl RpcListener
Default RPC Delegate
50
RpcManager SchemaContext
DOMRpcProviderService
read all rpc definitions
registerImplementation(remoteRpcImpl)
RPC Registered
51
RpcProviderRegistry
addRoutedRpcImpl
RoutedRpcRegistration
registerPath
RpcListener
RpcRegistry
Invoking a Remote RPC
52
RemoteRpcImpl
invokeRpc
RpcRegistry
Route found?
RpcBroker
ExecuteRpc
FooService
throw Exception
Invoking a Remote RPC
53
RemoteRpcImpl
Consumer
Provider
member-1 member-2
RpcBroker
RpcRegistry
invokeRpc
invokeRpcfindRoute
ExecuteRpc
#ODSummit
Data Store Diagnostics
Transaction Tracing
55
Created txn member-2-txn-9400 of type READ_WRITE on chain member-2-txn-chain-13
Client
Server
Tx member-2-txn-9400 read /(urn:opendaylight:inventory?...
member-3-shard-inventory-operational: Creating transaction : shard-member-2-txn-9400
Tx member-2-txn-9400 Readying 1 transactions for commit
Tx member-2-txn-9400 commit
member-3-shard-inventory-operational: Readying transaction member-2-txn-9400
member-3-shard-inventory-operational: Committing transaction member-2-txn-9400
Tx member-2-txn-9400: commit succeeded
Cluster Member
Initiator
Counter
Transaction Type
Module
Data store type
Replication Tracing
56
Leader
Sending AppendEntries to follower member-2-shard-topology-operational: AppendEntries [term=2, leaderId=member-1-shard-
topology-operational, prevLogIndex=520, prevLogTerm=2, entries=[Entry{index=521, term=2}], leaderCommit=520,
replicatedToAllIndex=-1]
Follower
handleAppendEntries: AppendEntries [term=2, leaderId=member-2-shard-topology-operational,
prevLogIndex=520, prevLogTerm=2, entries=[Entry{index=521, term=2}], leaderCommit=520,
replicatedToAllIndex=-1]
handleAppendEntries returning : AppendEntriesReply [term=2, success=true, logLastIndex=521,
logLastTerm=2, followerId=member-1-shard-topology-operational]
handleAppendEntriesReply from member-2-shard-topology-operational: applying to log –
commitIndex: 521, lastAppliedIndex: 520
handleAppendEntriesReply - FollowerLogInformation for member-2-shard-topology-operational updated:
matchIndex: 521, nextIndex: 522
Shard MBean
57
org.opendaylight.controller:type=DistributedOperationalDataStore,Category=Shards,name=member-1-shard-inventory-operational
Operational
Config
member-1
member-2
member-3
default
inventory
topology
operational
config
Attributes
AbortTransactionsCount CommitIndex CommittedTransactionsCount CurrentTerm FailedTransactionsCount
FollowerInfo FollowerInitialSync
Status
InMemoryJournalData
Size
InMemoryJournalLogSize LastApplied
LastCommittedTransactionTime LastIndex LastTerm Leader RaftState
ReadOnlyTransaction
Count
ReadWriteTransactionCount WriteOnlyTransaction
Count
VotedFor and more….
ShardManager MBean
58
org.opendaylight.controller:type=DistributedOperationalDataStore,Category=ShardManager,name=shard-manager-operational
Operational
Config
operational
config
Attributes
• LocalShards
• SyncStatus
Data store GeneralRuntimeInfo MBean
59
org.opendaylight.controller:type=DistributedConfigDatastore,name=GeneralRuntimeInfo
Operational
Config
Attributes
• TransactionCreationRateLimit
Transaction Commit Rate
MBean
60
org.opendaylight.controller.cluster.datastore:name=distributed-data-store.config.commit.rate
Attributes
• 50thPercentile
• 75thPercentile
• 90thPercentile
• and so on…
operational
config
• Count
• Min
• Max
• StdDev
Data store GeneralRuntimeInfo MBean
61
org.opendaylight.controller:type=DistributedConfigDatastore,name=GeneralRuntimeInfo
Operational
Config
Attributes
• TransactionCreationRateLimit
Message Statistics MBean
62
org.opendaylight.controller.actor.metric:name=/user/shardmanager-config.msg-rate.ActorInitialized
Attributes
• 50thPercentile
• 75thPercentile
• 90thPercentile
• and so on…
operational
config
• Count
• Min
• Max
• StdDev
Message Name
#ODSummit
Remote RPC Diagnostics
RemoteRpcBroker MBean
64
org.opendaylight.controller:type=RemoteRpcBroker,name=RemoteRpcRegistry
Attributes
• BucketVersions
• GlobalRpc
• LocalRegisteredRoutedRpc
Operations
• findRpcByName
• findRpcByRoute
Message Statistics MBean
65
org.opendaylight.controller.actor.metric:name=/user/rpc/registry.msg-rate.AddOrUpdateRoutes
Attributes
• 50thPercentile
• 75thPercentile
• 90thPercentile
• and so on…
• Count
• Min
• Max
• StdDev
Message Name
66
▪ Deploy a cluster
▪ Run clustering integration tests
▪ Write an application that works in the cluster
▪ Write bugs to report features which you find missing
▪ Try running dsBenchMark on a cluster
▪ Test out replication using the dummy data store
▪ Check out the code
▪ Send email to controller-dev@lists.opendaylight.org with questions
Suggested Next Steps…
67
#ODSummit
Thank You

More Related Content

What's hot

VPN, Its Types,VPN Protocols,Configuration and Benefits
VPN, Its Types,VPN Protocols,Configuration and BenefitsVPN, Its Types,VPN Protocols,Configuration and Benefits
VPN, Its Types,VPN Protocols,Configuration and Benefitsqaisar17
 
6 pan-os software update & downgrade instruction
6 pan-os software update & downgrade instruction6 pan-os software update & downgrade instruction
6 pan-os software update & downgrade instructionMostafa El Lathy
 
Introduction to OverTheBox
Introduction to OverTheBoxIntroduction to OverTheBox
Introduction to OverTheBoxOVHcloud
 
Network standards
Network standardsNetwork standards
Network standardshspatalia
 
Ingénieur Réseaux et Télécommunication
Ingénieur Réseaux et TélécommunicationIngénieur Réseaux et Télécommunication
Ingénieur Réseaux et TélécommunicationAhmed Makki
 
MPLS WC 2014 Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014  Segment Routing TI-LFA Fast ReRouteMPLS WC 2014  Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014 Segment Routing TI-LFA Fast ReRouteBruno Decraene
 
Container Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor SalcedaContainer Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor SalcedaCloud Native Day Tel Aviv
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorialopenflow
 
Building a CICD Pipeline for deploying on Containers
Building a CICD Pipeline for deploying on ContainersBuilding a CICD Pipeline for deploying on Containers
Building a CICD Pipeline for deploying on ContainersAmazon Web Services
 
Arquiteturas de Gerência de Redes
Arquiteturas de Gerência de RedesArquiteturas de Gerência de Redes
Arquiteturas de Gerência de RedesFrederico Madeira
 
Developing SDN apps in Ryu
Developing SDN apps in RyuDeveloping SDN apps in Ryu
Developing SDN apps in RyuChe Wei Lin
 
Presentation de NeuVector 5.0
Presentation de NeuVector 5.0Presentation de NeuVector 5.0
Presentation de NeuVector 5.0SUSE
 

What's hot (20)

Bringing up Aruba Mobility Master, Managed Device & Access Point
Bringing up Aruba Mobility Master, Managed Device & Access PointBringing up Aruba Mobility Master, Managed Device & Access Point
Bringing up Aruba Mobility Master, Managed Device & Access Point
 
VPN, Its Types,VPN Protocols,Configuration and Benefits
VPN, Its Types,VPN Protocols,Configuration and BenefitsVPN, Its Types,VPN Protocols,Configuration and Benefits
VPN, Its Types,VPN Protocols,Configuration and Benefits
 
6 pan-os software update & downgrade instruction
6 pan-os software update & downgrade instruction6 pan-os software update & downgrade instruction
6 pan-os software update & downgrade instruction
 
Firewall basics
Firewall basicsFirewall basics
Firewall basics
 
MPLS Presentation
MPLS PresentationMPLS Presentation
MPLS Presentation
 
Introduction to OverTheBox
Introduction to OverTheBoxIntroduction to OverTheBox
Introduction to OverTheBox
 
Vpn
VpnVpn
Vpn
 
MPLS & BASIC LDP
MPLS & BASIC LDPMPLS & BASIC LDP
MPLS & BASIC LDP
 
Network standards
Network standardsNetwork standards
Network standards
 
Ingénieur Réseaux et Télécommunication
Ingénieur Réseaux et TélécommunicationIngénieur Réseaux et Télécommunication
Ingénieur Réseaux et Télécommunication
 
IPSec VPN tunnel
IPSec VPN tunnelIPSec VPN tunnel
IPSec VPN tunnel
 
MPLS WC 2014 Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014  Segment Routing TI-LFA Fast ReRouteMPLS WC 2014  Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014 Segment Routing TI-LFA Fast ReRoute
 
Container Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor SalcedaContainer Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor Salceda
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorial
 
Building a CICD Pipeline for deploying on Containers
Building a CICD Pipeline for deploying on ContainersBuilding a CICD Pipeline for deploying on Containers
Building a CICD Pipeline for deploying on Containers
 
Network Rightsizing Best Practices Guide
Network Rightsizing Best Practices GuideNetwork Rightsizing Best Practices Guide
Network Rightsizing Best Practices Guide
 
Arquiteturas de Gerência de Redes
Arquiteturas de Gerência de RedesArquiteturas de Gerência de Redes
Arquiteturas de Gerência de Redes
 
VPN
VPNVPN
VPN
 
Developing SDN apps in Ryu
Developing SDN apps in RyuDeveloping SDN apps in Ryu
Developing SDN apps in Ryu
 
Presentation de NeuVector 5.0
Presentation de NeuVector 5.0Presentation de NeuVector 5.0
Presentation de NeuVector 5.0
 

Similar to Md sal clustering internals

Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022HostedbyConfluent
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...HostedbyConfluent
 
Oscon 2019 - Optimizing analytical queries on Cassandra by 100x
Oscon 2019 - Optimizing analytical queries on Cassandra by 100xOscon 2019 - Optimizing analytical queries on Cassandra by 100x
Oscon 2019 - Optimizing analytical queries on Cassandra by 100xshradha ambekar
 
Bridge to the Future: Migrating to KRaft
Bridge to the Future: Migrating to KRaftBridge to the Future: Migrating to KRaft
Bridge to the Future: Migrating to KRaftHostedbyConfluent
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on LabMichelle Holley
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
Building OpenDNS Stats
Building OpenDNS StatsBuilding OpenDNS Stats
Building OpenDNS StatsGeorge Ang
 
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStackExperiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStackinside-BigData.com
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security BoundaryWill Schroeder
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and ArchitectureSidney Chen
 
Scaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssScaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssAnil Nair
 
Percona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialPercona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialAntonios Giannopoulos
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebAll Things Open
 
Logging in dockerized environment
Logging in dockerized environmentLogging in dockerized environment
Logging in dockerized environmentYury Bushmelev
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No KeeperC4Media
 
Heart of the SwarmKit: Store, Topology & Object Model
Heart of the SwarmKit: Store, Topology & Object ModelHeart of the SwarmKit: Store, Topology & Object Model
Heart of the SwarmKit: Store, Topology & Object ModelDocker, Inc.
 
Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...
Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...
Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...confluent
 
Streaming architecture patterns
Streaming architecture patternsStreaming architecture patterns
Streaming architecture patternshadooparchbook
 

Similar to Md sal clustering internals (20)

Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
 
Oscon 2019 - Optimizing analytical queries on Cassandra by 100x
Oscon 2019 - Optimizing analytical queries on Cassandra by 100xOscon 2019 - Optimizing analytical queries on Cassandra by 100x
Oscon 2019 - Optimizing analytical queries on Cassandra by 100x
 
Bridge to the Future: Migrating to KRaft
Bridge to the Future: Migrating to KRaftBridge to the Future: Migrating to KRaft
Bridge to the Future: Migrating to KRaft
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on Lab
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Building OpenDNS Stats
Building OpenDNS StatsBuilding OpenDNS Stats
Building OpenDNS Stats
 
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStackExperiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Scaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssScaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ss
 
Percona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialPercona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorial
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
 
Logging in dockerized environment
Logging in dockerized environmentLogging in dockerized environment
Logging in dockerized environment
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
Heart of the SwarmKit: Store, Topology & Object Model
Heart of the SwarmKit: Store, Topology & Object ModelHeart of the SwarmKit: Store, Topology & Object Model
Heart of the SwarmKit: Store, Topology & Object Model
 
Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...
Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...
Kafka Needs no Keeper( Jason Gustafson & Colin McCabe, Confluent) Kafka Summi...
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Streaming architecture patterns
Streaming architecture patternsStreaming architecture patterns
Streaming architecture patterns
 
Chapter14ccna
Chapter14ccnaChapter14ccna
Chapter14ccna
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
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 MountPuma Security, LLC
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Md sal clustering internals

Editor's Notes

  1. There are 2 subsystems supported by the MD-SAL Clustering implementation. The distributed datastore which ensures that data stored in the datastore is accessible for all members of the cluster and which allows the MD-SAL data tree to be broken up into sub-trees so that it can be distributed around the cluster. The Remote RPC connector which ensures that an RPC implemented by a remote RPC provider is accessible from anywhere in the cluster.
  2. The MD-SAL clustering implementation is built on top of akka. Akka is a library which allows us to create autonomous components call actors which you can interact with by sending them asynchronous messages. Since Akka can ensure that only one message may be concurrently process by an actor it makes it easy to create thread safe components. Akka also has several modules which make it easy to build a clustered application or infrastructure on top of it. The distributed datastore for example uses akka-persistence. This is a module which helps the datastore persist state to disk and to allow it to recover based on that persisted state. Every modification that is made to the datastore gets persisted to disk and occasionally we create a snapshot of the state (tree) so that when we restart the data store we can recover the state faster. The Distributed Data Store and Remote RPC Connector both use akka-remoting. This module is used for one cluster member to send a message to an actor on a remote cluster member. This is an essential building block of our clustering implementation. Remoting in turn uses netty. Finally both the Distributed Data Store and Remote RPC connector use akka-clustering to discover new members in an akka cluster so that they can then communicate with their peers on other members.
  3. Distributed Data Store and Remote RPC Connector both use their own akka Actor System. An akka actor system consist of three things, An actor hierarchy. It’s called a hierarchy because actors can have supervisors and children. Failures flow up the supervision chain. An actor can also delegate some work to it’s children so that more work can be done in parallel. Configuration and Dispatchers which schedule messages to be delivered to an actor.
  4. The Distributed Data Store is a strongly consistent store – this strong consistency is ensured by the use of the Raft Distributed Consensus algorithm which requires that all data modifications are initiated by a Leader which replicates data to it’s followers – thus ensuring that the order in which modifications are done on all cluster members is the same. The Remote RPC connector also replicates data. It replicates all the registered Rpcs on each node to all the other nodes in the cluster.
  5. RpcBroker executes Rpc requests received from remote notes RpcRegistry manages the replication of the rpc registry – it extends BucketStore RemoteRpcImpl is the default delegate which is invoked when an rpc registration is not found in the md-sal core RpcBrokers’ registry RpcListener receives notifications whenever a rpc is registered by a Provider