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

Alexey Biryukov commented on THRIFT-904:
----------------------------------------

I wish it was not in any implementation. My reasons for that are explained 
above.

The difference between framed transport and others is in additional 4 byte 
header (as far as I remember) that is prepended to each packet. If the header 
is put to TCP with a separate call (as it had been in the code I was fixing), 
you will have 2 segments going one after another in the same direction, first 
of them being only a few bytes long. This is what Nagle/Linger are intended to 
prevent, and this is preventable. IMO disabling Nagle/Linger in this case is 
like fighting the symptom but not the cause. And there's nothing about simple 
or advanced cases, just give the whole packet to TCP and that's it. 
(Alternatively, you can use TCP_CORK on Linux, but this is in no way portable 
solution.)

> C# TSocket should disable nagle and linger
> ------------------------------------------
>
>                 Key: THRIFT-904
>                 URL: https://issues.apache.org/jira/browse/THRIFT-904
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>            Reporter: Jonathan Ellis
>            Assignee: Alexey Biryukov
>             Fix For: 0.6
>
>         Attachments: thrift-904.patch, thrift-904.tests.patch
>
>
> Java sets
>       socket_.setSoLinger(false, 0);
>       socket_.setTcpNoDelay(true);
> C# should do the equivalent.

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

        

Reply via email to