<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:54 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-1193] Support maximum value and random selection of wait time between connection attempts</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-1193</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Currently there are following two parameters that control the wait time between NETCONF connection attempts:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/opendaylight/netconf/blob/master/plugins/netconf-client-mdsal/src/main/yang/odl-netconf-device.yang#L177&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;between-attempts-timeout-millis&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/opendaylight/netconf/blob/master/plugins/netconf-client-mdsal/src/main/yang/odl-netconf-device.yang#L185&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sleep-factor&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Since the wait time increases with the multiplicative factor of &lt;tt&gt;sleep-factor&lt;/tt&gt; after each connection failure the gap between connection attempts increases very quickly. And this also means that the wait time increases as fast as the total elapsed time of connectivity loss or connection attempts.&lt;/p&gt;

&lt;p&gt;For example, assuming the following default configuration values:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;between-attempts-timeout-millis&lt;/tt&gt;: 2 seconds&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;sleep-factor&lt;/tt&gt;: 1.5&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;connection-timeout-millis&lt;/tt&gt;: 20 seconds&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Total elapsed time after &lt;tt&gt;n&lt;/tt&gt; reconnections is {{ 20 x n + (1.5^(n - 1) - 1) / (1.5 - 1) x 2 }} and the next wait time is {{ 1.5^n x 2 }}:&lt;/p&gt;

&lt;p&gt;So the total elapsed times look like this:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;n=17&lt;/tt&gt;: 2963&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=18&lt;/tt&gt;: 4297&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=19&lt;/tt&gt;: 6288&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=20&lt;/tt&gt;: 9263&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The next wait times are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;n=17&lt;/tt&gt;: 1970&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=18&lt;/tt&gt;: 2955&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=19&lt;/tt&gt;: 4433&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=20&lt;/tt&gt;: 6650&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This means after over 2.5 hours of connectivity loss (&lt;tt&gt;n=20&lt;/tt&gt;, 9263 seconds), the the NETCONF session may not recover for almost another 1 hour and 50 minutes (6650 seconds) even if the issue has been resolved right after the 20th connection attempt because of the long wait time.&lt;/p&gt;

&lt;p&gt;This most likely is not an expected behavior and it is common to have the maximum value limiting the gap between connection attempts when exponential backoff is used - also it&apos;s common to introduce randomness to avoid synchronization between different connection attempts - e.g. if multiple devices are disconnected due to the same network connectivity issue, the controller may try to connect to the devices almost at the same time.&lt;/p&gt;</description>
                <environment></environment>
        <key id="37514">NETCONF-1193</key>
            <summary>Support maximum value and random selection of wait time between connection attempts</summary>
                <type id="10103" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10311&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="cicut">&#317;ubo&#353; &#268;i&#269;ut</assignee>
                                    <reporter username="sangwookha">Sangwook Ha</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Mon, 30 Oct 2023 23:05:55 +0000</created>
                <updated>Thu, 25 Jan 2024 09:00:12 +0000</updated>
                            <resolved>Thu, 25 Jan 2024 09:00:12 +0000</resolved>
                                                    <fixVersion>7.0.0</fixVersion>
                    <fixVersion>5.0.10</fixVersion>
                    <fixVersion>6.0.7</fixVersion>
                                    <component>netconf-client-mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="73012" author="ivanhrasko" created="Wed, 10 Jan 2024 09:10:09 +0000"  >&lt;p&gt;IMO the next wait time is {{ 1.5^(n-1) x 2 }}, for example:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;n=17&lt;/tt&gt;: 1313&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=18&lt;/tt&gt;: 1970&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=19&lt;/tt&gt;: 2955&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;n=20&lt;/tt&gt;: 4433&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i046t3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>