Top Banner
www.opendaylight .org odl-mdsal-clustering Moiz Raja OpenDaylight Silicon Valley Meetup 04/28/2015
28
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

odl-mdsal-clustering

Moiz Raja

OpenDaylight Silicon Valley Meetup

04/28/2015

Page 2: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Topics

▪ Components

▪ Requirements

▪ Design

▪ Testing

▪ Monitoring

▪ Challenges

▪ Insights

▪ What’s missing

Page 3: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Components

Page 4: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

▪Remote RPC▪Distributed Data Store▪Remote Notifications ???

Page 5: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Requirements

Page 6: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

▪Location Transparency▪Drop in replacement for IMDS▪Persistence▪Strongly Consistency▪Data Change Notifications▪Static configuration▪Sharding capabilities

Page 7: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Design

Page 8: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Data Broker

Config DataStore Operational DataStore

Page 9: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Data Broker

IMDS IMDS

Page 10: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Data Broker

CDS CDS

Page 11: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

org.opendaylight.controller.sal.core.spi.data.DOMStore

DistributedDataStore

Page 12: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Distributed Data Store

Data Broker Inventory Shard

TopologyShard

DefaultShard

ShardManager

Page 13: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Distributed Data Store

Data Broker Inventory Shard

Transaction Proxy

Transaction Context Shard Transaction

ShardManager

findP

rimar

ycr

eate

Tran

sact

ion

modification

1

2

3

4

5

6

txn = db.newReadWriteTransaction();txn.merge(LogicalDataStoreType.OPERATIONAL, id, node)

Page 14: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Akka Remoting

Akka Clustering Akka Persistence

Raft Actor

Shard Consistency

Persistence

Remote Communication

Discovery

State Holder

Page 15: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Akka Remoting

Akka Clustering Akka

Persistence

Raft Actor

Shard – Replica 1

Akka Remoting

Akka Clustering Akka

Persistence

Raft Actor

Shard – Replica 2

member-1 (10.194.126.242) member-2 (10.194.126.243)

member-2 is on 10.194.126.243 member-1 is on 10.194.126.242

Page 16: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

We are here

Page 17: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

What about Availability?

▪ We are available as long as a majority of the replicas are connected

▪(N / 2) + 1 out of an N node cluster

▪2 out of 3 nodes in a 3 node cluster

▪3 out of 4 nodes in a 4 node cluster

▪3 out of 5 nodes in a 5 node cluster

▪and so on

Page 18: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Configuration/RAFT determine availability

▪ If inventory is configured to be on,

▪member-1

▪member-2

▪member-3

▪then atleast 2 of those members need to be running for the inventory data cluster to be available

▪ If inventory in only configured to be on,

▪member-1

▪then just member-1 needs to be running for the inventory data cluster to be available

Page 19: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Testing

▪ Unit tests (> 80% code coverage)

▪ Integration test (aka car-people test) for testing HA/Failover in a real cluster

▪ dsBenchmark for performance testing

▪ Dummy Datastore for testing replication overhead

▪ Raft test driver for testing the Raft implementation on a single box

▪ Other Performance/Scale tests

▪BGP using exabgp and some other test scripts

▪PCEP using pcc-mock

▪Netconf using the netconf simulator

▪Cbench for openflow

Page 20: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Monitoring

▪ Mbeans

▪org.opendaylight.controller

▪DistributedConfigDataStore

▪DistributedOperationalDataStore

▪org.opendaylight.controller.actor.metric

▪org.opendaylight.controller.cluster.datastore

Page 21: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Page 22: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Page 23: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Page 24: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Page 25: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Challenges

▪ API

▪ Serialization

▪ Memory

▪ Messaging and Context Switching

▪ Back Pressure

▪Operations

▪Transactions

▪ Remoting Latencies

▪ Persistence Latencies

Page 26: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

Insights

▪ Bulk transactions work best

▪ Avoid multiple writers

▪ Try to write to only one shard in a transaction

Page 27: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

What’s missing?

▪ Remote Notifications

▪ Dynamic addition/removal of servers

▪ Fine grained sharding

Page 28: OpenDaylight MD-SAL Clustering Explained

www.opendaylight.org

The End!