1 .. contents:: Table of Contents
4 ==============================
5 Device Connection Rate Limiter
6 ==============================
8 `Device Connection Rate Limiter Reviews <https://git.opendaylight.org/gerrit/#/c/70157>`__
10 When many openflow devices try to connect at the same time, this feature helps to reduce load on ODL controller, by
11 limiting the number of devices connecting per minute.
13 Before starting the contoller, user should uncomment and configure ``device-connection-rate-limit-per-min`` property
14 value in ``openflowplugin.cfg`` file for limiting the number of device connections.
19 When many openflow devices try to connect to the ODL controller via openflowplugin at the same time, controller gets
20 overloaded by processing too many device connection requests, port information, switch feature information and supported
21 statistics. Due to which controller gets overwhelmed, that can result in device disconnection and message drops. Hence
22 this can largely impact the performance of the controller.
24 Device connection rate limiter is intended to overcome this problem by limiting the number of openflow devices
25 connecting to the ODL controller, there by reducing the load on the controller. Due to which only configured number of
26 devices will be able to connect to the ODL controller per minute. The remaining devices which are not able to get the
27 permit, will be disconnected. The disconnected devices will keep on trying to connect and will be succeeded in
28 subsequent retries, when they acquire the permit as per rate limiter logic.
32 1. By default device connection rate limiter feature will be disabled. So there will be no effect on the rate at which
33 openflow devices connect to the ODL controller.
35 2. The property can be uncommented and set to any non-zero positive value in openflowplugin.cfg file, then those many
36 number of openflow devices are allowed to connect to the ODL controller in a minute.
40 1. Device connection rate limiter service is created as part of blueprint container initialization for
41 openflowplugin-impl module.
43 2. Rate limiter service is created using Ratelimiter entity/class of Google's concurrency framework. ConnectionManager
44 will be creating rate limiter service and HandshakeManager will be holding the reference to the rate limiter service.
46 3. Based on the value of device-connection-rate-limit-per-min property present in openflowplugin.cfg file, the rate
47 limiter value is decided. If the value is zero, then the rate limiting functionality will be disabled or else the
48 functionality will be enabled by allowing specified number of permits per minute.
50 4. At the openflow handshake phase after fetching the device features, if the rate limiter is enabled then an attempt
51 will be made to acquire a connection permit for the openflow device. If device is able to get the permit, then the
52 handshake process will be continued or else the device will be rejected to connect to the ODL controller. Then a
53 disconnection event will be sent to the openflow device. The device will be succeeded to connect in subsequent
56 5. As device-connection-rate-limit-per-min is a static property, any change in the property value will be effective only
57 when the ODL controller is started with changed value.
59 Command Line Interface (CLI)
60 ============================
72 openflow-provider-config.yang file is modified to define the rate limiter property.
75 :caption: openflow-provider-config.yang
77 leaf device-connection-rate-limit-per-min {
84 New property ``device-connection-rate-limit-per-min`` added to openflowplugin.cfg file.
87 :caption: openflowplugin.cfg
89 # To limit the number of datapath nodes to be connected to the controller instance
90 # per minute. When the default value of zero is set, then the device connection rate
91 # limiter will be disabled. If it is set to any value, then only those many
92 # number of datapath nodes are allowed to connect to the controller in a minute
94 # device-connection-rate-limit-per-min=0
96 Clustering considerations
97 -------------------------
98 The device connection rate limiter service will be per controller basis even if controllers are connected in a clustered
101 Other Infra considerations
102 --------------------------
105 Security considerations
106 -----------------------
109 Scale and Performance Impact
110 ----------------------------
111 As this feature will control the rate at which the openflow devices connect to the ODL controller, it will improve the
112 performance of controller by reducing the load in connection request processing during controller/cluster reboot.
127 included with common openflowplugin features.
143 - Somashekhar Javalagi(somashekhar.manohara.javalagi@ericsson.com)
146 - Gobinath Suganthan (gobinath@ericsson.com)
155 This doesn't add any new dependencies.
160 1. Verifying the number of openflow device connections to the ODL controller without doing any modification to the
161 openflowplugin.cfg file.
162 2. Verifying the rate at which the openflow devices connecting to the ODL controller in case if the property is having
163 any non-zero positive value, with many devices trying to connect at the same time.