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

Jason Brown commented on CASSANDRA-8457:
----------------------------------------

latest changes:

- add netty's {{IdleStateHandler}} to the outbound pipeline. This allows us to 
monitor for a socket not being able to make progress sending bytes (or, at 
least, putting them into the socket buffer). When we don't make progress, we 
can close the channel and purge the back log of messages.
- makes better use of netty's high/low water marks. Instead of naively using 
that as a flush indicator (which is now, properly, at the end of 
{{MessageOutHandler#write()}}, I'm using the high/low water marks as when to 
stop writing to the channel ({{OutboundMessagingConnection#sendMessage()}}). I 
then add those messages to the backlog queue in 
{{OutboundMessagingConnection}}. When the channel becomes writable again 
(because bytes were shipped out), we can purge some of the backlogged messages 
from {{MessageOutHandler#channelWritabilityChnaged()}}.
- add support for CASSANDRA-9748 (somehow got missed before)

[~slebresne] I'm adding a few more unit tests and minor doc updates, but please 
review the latest set of changes. 

> nio MessagingService
> --------------------
>
>                 Key: CASSANDRA-8457
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8457
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Jonathan Ellis
>            Assignee: Jason Brown
>            Priority: Minor
>              Labels: netty, performance
>             Fix For: 4.x
>
>
> Thread-per-peer (actually two each incoming and outbound) is a big 
> contributor to context switching, especially for larger clusters.  Let's look 
> at switching to nio, possibly via Netty.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to