You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/07/26 11:03:24 UTC

[GitHub] [cloudstack] rhtyd opened a new pull request #3525: NioServer: retain links by address string to minimize resource leak

rhtyd opened a new pull request #3525: NioServer: retain links by address string to minimize resource leak
URL: https://github.com/apache/cloudstack/pull/3525
 
 
   Every time a client connects, the NioServer will retain the link against
   the InetSocketAddress object. If the same agent/client reconnects, it
   will grow older links over time and in case of denial of service attack
   or a client/script/monitoring-service reconnecting aggressively against
   port 8250 will cause the `_links` weak hashmap to grow over time and
   very quickly.
   
   The fix will ensure that only one Link gets weakly retained for an
   incoming client based on its address string.
   
   This is what is seen when only one kvm/agent connects to the management server:
   ![Screenshot from 2019-07-26 16-24-05](https://user-images.githubusercontent.com/95203/61947490-eb6fce00-afc2-11e9-99e1-9d01f64cf969.png)
   
   When I restart the cloudstack-agent couple of times, I see the `_links` grow:
   ![Screenshot from 2019-07-26 16-24-17](https://user-images.githubusercontent.com/95203/61947523-03475200-afc3-11e9-9a68-5966f1276fda.png)
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services