Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

1

Rest API response time

asked 2015-04-08 06:54:47 -0800

Nuno gravatar image

Hello.

When a new rest request (for example adding a flow is issued) by for example using postman, it returns a value when the 200 OK response comes. My question is, the 200 OK is issued by the controller when the flow is installed on the switch or just when the request is received and seems to have a correct format ?

Thanks in advance, Nuno B.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
5

answered 2015-04-08 09:39:13 -0800

jamoluhrsen gravatar image

updated 2015-04-13 15:14:59 -0800

Nuno, if the flow has the correct format and you are giving it to the "config" store of the controller you will get a 200. AFAIK there is no way of known in that transaction if the flow was installed correctly on the switch or not. If you wait for some time (up to 3 seconds by default) the controller should be polling the connected switches for stats. If the flow exists on the switch, then you can query the "operational" store to verify if the switch has the flow or not.

So, the work flow would be like this:

  1. push flow to controller via REST, and on success it will exist in the config store
  2. under the hood, the controller will then push the flow to the switch. on success it will exist in the switch.
  3. stats are collected in some polling cycle by the controller. Once the flow is on the switch, the polling cycle will see that flow and update the operational store.

If you want to know how long it takes for the flow to be seen in the operational store you will be limited by that polling cycle since it could be present on the switch for some period before the operational store is updated.

Once you have installed the controller and deployed the features that enable the openflow services you will find a config file in the distribution subfolder "etc/opendaylight/karaf/30-statistics-manager.xml" In that file you change the default from 3000ms (3s) to something smaller or larger as needed. I believe a restart of the controller is needed after changing that file, and that file will not be created until the feature(s) that use it are enabled.

edit flag offensive delete publish link more

Comments

When I make a request to add a flow, it is installed "instantly". I never had to wait something like 15 seconds neither can I find that on file "custom.properties". So when a 200 OK is issued it means that the request is on config data store not on the operational data store is that right ? Basically I just want to know the time that a flow takes to be installed on switch (i.e the time that a flow takes to be installed on operational data store) after a rest request is issued. I'm not sure if there is a way to do it or if I can find a way to discover it.

Nuno ( 2015-04-13 07:17:00 -0800 )edit

So that's a parameter that cannot be altered by configuration files right ? In that case, is there a way to find out the polling cycle time ?

Nuno ( 2015-04-13 13:05:31 -0800 )edit

I found the place to configure it. I was wrong about 15s being the default. It's 3s, so I changed the answer above to reflect that as well.

jamoluhrsen ( 2015-04-13 15:15:36 -0800 )edit

So I suppose that the value is not lower because of performance issues right ?

Nuno ( 2015-04-13 16:18:12 -0800 )edit

That would be my guess. even 3s might be too chatty in a larger network.

jamoluhrsen ( 2015-04-13 16:20:26 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-04-08 06:54:47 -0800

Seen: 357 times

Last updated: Apr 13 '15