<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.7</li>
<li>Operating System version: Mac OS</li>
<li>Java version: 1.8</li>
<li>Spring Boot 2.3.1.RELEASE</li>
</ul>
<p dir="auto">I'm in trouble how to dynamic find dubbo service providers.</p>
<p dir="auto">Here is one example:</p>
<p dir="auto">I have multiple implementations for the service, which is seperated by different group. But I don't how many groups at the begining. I want the consumer find the correct group from config center, and then I could change the config without modify any code or restart the application.</p>
<p dir="auto">But I don't know how to use a dynamic service, or change the group of a service dynamically.</p>
<p dir="auto">The only way I can find is using <a href="http://dubbo.apache.org/en-us/docs/user/demos/reference-config-cache.html" rel="nofollow">ReferenceConfig</a> to find provider in api mode. But I prefer a configration way, which is more readable and maintainable.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.3</li>
<li>Operating System version: macOs Sierra</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">服务端启动后，20880端口正常打开，客户端在端口打开后偶尔会报connect timeout的现象，从网络来看有丢SYN包的情况，主要是由于accept queue满了导致的。</p>
<ol dir="auto">
<li>服务端机器的配置不是很高，应用启动过程需要消耗大量CPU初始化工作。</li>
<li>客户端多线程并发发起到服务端的连接，每秒钟发起几百上千个连接请求。</li>
<li>在服务端机器看到有accept queue满的情况。</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3220 times the listen queue of a socket overflowed 
3220 SYNs to LISTEN sockets dropped"><pre class="notranslate"><code class="notranslate">3220 times the listen queue of a socket overflowed 
3220 SYNs to LISTEN sockets dropped
</code></pre></div>
<ol start="4" dir="auto">
<li>通过查看当前端口的连接队列，只有50个，也就是netty3的默认backlog，实际队列最高是101个。</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[~]# ss -lnt 
State Recv-Q Send-Q Local Address:Port Peer Address:Port 
LISTEN 0 50 *:20880 *:*"><pre class="notranslate"><code class="notranslate">[~]# ss -lnt 
State Recv-Q Send-Q Local Address:Port Peer Address:Port 
LISTEN 0 50 *:20880 *:*
</code></pre></div>
<p dir="auto">Netty4的默认backlog也是1000，所以把Netty3的默认backlog调整成1024.</p>