[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15270724#comment-15270724
 ] 

ASF subversion and git services commented on CLOUDSTACK-9348:
-------------------------------------------------------------

Commit 7ce0e10fbcd949375e43535aae168421ecdaa562 in cloudstack's branch 
refs/heads/master from [~williamstev...@gmail.com]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=7ce0e10 ]

Merge pull request #1493 from shapeblue/nio-fix

CLOUDSTACK-9348: Use non-blocking SSL handshake in NioConnection/Link- Uses 
non-blocking socket config in NioClient and NioServer/NioConnection
- Scalable connectivity from agents and peer clustered-management server
- Removes blocking ssl handshake code with a non-blocking code
- Protects from denial-of-service issues that can degrade mgmt server 
responsiveness
  due to an aggressive/malicious client
- Uses separate executor services for handling connect/accept events

Changes are covered the NioTest so I did not write a new test, advise how we 
can improve this. Further, I tried to invest time on writing a benchmark test 
to reproduce a degraded server but could not write it deterministic-ally 
(sometimes fails/passes but not always). Review, CI testing and feedback 
requested /cc @swill @jburwell @DaanHoogland @wido @remibergsma 
@rafaelweingartner @GabrielBrascher

* pr/1493:
  CLOUDSTACK-9348: Use non-blocking SSL handshake
  CLOUDSTACK-9348: Unit test to demonstrate denial of service attack

Signed-off-by: Will Stevens <williamstev...@gmail.com>


> CloudStack Server degrades when a lot of connections on port 8250
> -----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9348
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9348
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Rohit Yadav
>            Assignee: Rohit Yadav
>             Fix For: 4.9.0
>
>
> An intermittent issue was found with a large CloudStack deployment, where 
> servers could not keep agents connected on port 8250.
> All connections are handled by accept() in NioConnection:
> https://github.com/apache/cloudstack/blob/master/utils/src/main/java/com/cloud/utils/nio/NioConnection.java#L125
> A new connection is handled by accept() which does blocking SSL handshake. A 
> good fix would be to make this non-blocking and handle expensive tasks in 
> separate threads/pool. This way the main IO loop won't be blocked and can 
> continue to serve other agents/clients.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to