Day 68: Syncing between master and slave controllers Part 2
We decided in our previous post that we need to keep our slave controller in sync.
What is the scenario we are looking at?
Since the master controller knows all flows at all times, the slave controller would contact the master controller just after switch migration. The master controller which is aware of the switch migration would give necessary details of the flows in the switch for the proper communication between slave controller and switch.
Few problems with this approach:
What is the scenario we are looking at?
- The master controller gets connected to all switches and contributed to installing flows in them, thus master controller knows all flows in all switches
- The slave controllers mostly get connected to only switches in their domain and thus whenever a switch migrates from one slave to another slave, the second slave controller has to spend bandwidth and time knowing about the flows installed in it
Since the master controller knows all flows at all times, the slave controller would contact the master controller just after switch migration. The master controller which is aware of the switch migration would give necessary details of the flows in the switch for the proper communication between slave controller and switch.
Few problems with this approach:
- Switch migration is not a functionality of the master controller, it happens in the load balancer
- Once the switch migrates from one slave controller 1 to another slave controller, there is no conclusive way of telling if it was switch migration or an addition of a new switch
- The master controller has to keep monitoring both slave controllers to detect any switch migration - I tries this but seemed like an overhead. Thus, I found a better solution
- Each switch gets connected to 1 slave and 1 master when new flows have to be installed in it
- In the rest of the time, it is required for all controllers to monitor all switches if they are going through a DoS attcak
- As explained in post Day 65, all controllers keep monitoring switch statistics by creating new TCP connections
- These connections get initiated on the controller side and receive a reply from the switch
- During this phase, switch flows are also exchanged as statistical information
- Thus, all controller monitoring a particular switch know about all flows installed in them
- Each controller monitors switches in a round-robin sort of fashion by applying necessary locks and removing these locks once the data is extracted
- Thus all controller remain in sync, but just without the intervention of the master controller
- Whatever I had planned to communicate between master and slave controllers in my previous approach, I am doing the same by just contacting the switch directly now.
Author: Shravanya
Co-author: Swati
Comments
Post a Comment