www.opendaylight.org
Openflow Clustering
Kamal Rameshan
ODL Committer - Openflowplugin
OpenDaylight Silicon Valley Meetup
04/18/2016
www.opendaylight.org
Collaborated with
▪ Moiz Raja – Cisco
▪ Michal Rehak – Cisco/Pantheon
▪ Tom Pantelis - Brocade
▪ Vaclav Demcak – Cisco/Pantheon
▪ Anil Vishnoi – Brocade
▪ Abhijit Kumbhare - Erricson
2
www.opendaylight.org
Topics
▪ Relevant Components
▪ Why Clustering with Openflow?
▪ How its implemented in ODL?
▪ Challenges
▪ Yet to be implemented/In-progress
▪ Questions
www.opendaylight.org
Relevant Components
▪ Openflowplugin
▪ Entity Ownership Service
▪ OpenflowJava
▪ Remote Rpc Connector
▪ Clustered Datastore
▪ Rpc Broker
4
www.opendaylight.org
Why Openflow Clustering ?
▪ High Availability (HA)
▪ Scale
5
www.opendaylight.org
High Availability
▪ Failover the active connection to another controller
▪ Limited support in Openflow 1.0
▪ Openflow 1.3+ has support for roles
6
www.opendaylight.org
Failover with Openflow 1.0
7
C1 C2 C3
Virtual
IP
Switch
www.opendaylight.org
Failover with Openflow 1.0
8
C1 C2 C3
Virtual
IP
Switch
www.opendaylight.org
Failover with Openflow 1.3
9
C1 C2 C3
Switch
Slave Role
Slave Role
Master Role
www.opendaylight.org
Failover with Openflow 1.3
10
C1 C2 C3
Switch
Slave Role
Master Role
www.opendaylight.org
Roles in Openflow 1.3 and beyond
▪ Equal Role
o Default Role.
o Both reads and writes are possible by a Equal Role Controller
o Multiple Controllers can have the equal role
▪ Master Role
o Only one controller can be the Master
o Both reads and writes are possible , similar to Equal
o Recieves aysnc messages from switch
▪ Slave Role
o More than one controller can be the slave role
o Only Reads are possible from the slave controller
o No async messages are received (by default)
11
www.opendaylight.org
Scale
▪ Switches can connect to a subset of the controller cluster . E.g. 2 out of 5
▪ Mastership is distributed across the cluster (or connected nodes) via
Entity Ownership Strategy : FIFO, Last-one, Load-Balanced etc
▪ Horizontal scaling (with Be) – Add more controller nodes and connect to
switches
12
www.opendaylight.org
How is OF Clustering implemented in ODL?
13
www.opendaylight.org
Failover with Openflow 1.3 +
14
EOS EOS EOS
Switch
1 1
12
2
2
4
1. Switch Connects
2. Program Slave Role
3. EOS election
4. Program Master Role
3 3
www.opendaylight.org
New Connection in a Master
15
www.opendaylight.org
New Connection in Slave
16
www.opendaylight.org
Role Change
17
OFP/OFJ Switch
ofp_role_request(OFPCR_ROLE_NOCHANGE )
ofp_role_reply (generation_id_x)
ofp_role_request(OFPCR_ROLE_MASTER , generation_id_x+1)
ofp_role_reply (generation_id_y)
Loop (retries = 42)
www.opendaylight.org
Entity-Ownership-Service
▪ Plays the role of an arbiter and elects a candidate
▪ Ownership Changed notifications
o Is-owner : denotes if the controller receiving this notification is the owner of this entity
o Was-owner : denotes if the controller receiving this notification was the owner of this entity
o Has-owner : denotes if a controller in this cluster is an owner of this entity
▪ Election Strategies
o First Candidate Selection Strategy (default)
o Least Loaded Candidate Selection Strategy
How to Change Election Strategy
1. Create a file in etc folder with the
name org.opendaylight.controller.cluster.entity.owner.selection.strategies .cfg
2. entity.type.openflow=org.opendaylight.controller.cluster.datastore.entityownership.selectionst
rategy.LeastLoadedCandidateSelectionStrategy,5000
Entities lookup: localhost:8181/restconf/operational/entity-owners:entity-owners
Openflow Clustering is implemented using 2 types of entities : openflow AND
ofTransaction
18
www.opendaylight.org
ofTransaction Entity
19
www.opendaylight.org
Challenges
▪ Race conditions across cluster nodes
▪ Switch connection flapping
▪ Scale
▪ Partitions and Isolated Leader/Master
20
www.opendaylight.org
TBD
▪ Set Aysnc Config Message : To enable slaves to receive certain async
messages. Helps in spreading the load
▪ Scale and Device Initialization
▪ How to choose a subset of the controllers to connect to?
▪ Symmetric Datastore , Memory and East-West traffic
21
www.opendaylight.org
QUESTIONS
22

OpenDaylight OpenFlow clustering