[JBoss JIRA] Commented: (NETTY-311) Add connection limit handlers

Benoit Perroud (JIRA) jira-events at lists.jboss.org
Tue Jan 25 03:47:49 EST 2011


    [ https://issues.jboss.org/browse/NETTY-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577684#comment-12577684 ] 

Benoit Perroud commented on NETTY-311:
--------------------------------------

You could also use in CommectionPerIp the same logic with AtomicInteger as in CommectionLimit : 

Map<String, AtomicInteger> connections.

Moreover you could use a ConcurrentMap (ConcurrentHashMap implementation) that do not require synchronization. Please have a look at the attached diff.

One last point I haven't addressed in my patch, it should be a good thing to remove from the Map AtomicInteger that reach 0, in order to not have the size of this map going bigger infinitely.

> Add connection limit handlers
> -----------------------------
>
>                 Key: NETTY-311
>                 URL: https://issues.jboss.org/browse/NETTY-311
>             Project: Netty
>          Issue Type: Feature Request
>          Components: Handler
>            Reporter: Norman Maurer
>            Assignee: Trustin Lee
>         Attachments: ConnectionLimitUpstreamHandler.java, ConnectionPerIpLimitUpstreamHandler.java, ConnectionPerIpLimitUpstreamHandler_ConcurrentMap.patch
>
>
> Netty does not ship any connection limit handlers. This should be changed. I think its a common problem users want to solve

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the netty-dev mailing list