thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Morgan <chmor...@gmail.com>
Subject Re: c# THttpClient is using HttpVersion.Version10 - leading to 42ms response times
Date Thu, 17 Mar 2011 16:08:42 GMT
On Thu, Mar 17, 2011 at 12:05 PM, Simon Reavely <simon.reavely@gmail.com> wrote:
> Precisely, that's my assumption. Its really HTTP 101, so I was really
> surprised to see that the csharp client class was using HTTP 1.0. I'm
> interested to see if ANYONE has successfully used the thrift csharp
> HTTPClient...I don't see how this could have worked for anyone with low
> latency requirements.
> Surely I can't be the first to try this?
> S.
>
> On Thu, Mar 17, 2011 at 11:01 AM, Chris Morgan <chmorgan@gmail.com> wrote:
>>
>> On Thu, Mar 17, 2011 at 8:55 AM, Simon Reavely <simon.reavely@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I am using C# thrift with the HttpClient, talking to a Java HttpServlet.
>> > Java clients work fine, but the performance of my C# clients is awful
>> > (like
>> > 42ms)
>> >
>> > I found that if I changed
>> > connection.ProtocolVersion = HttpVersion.Version10;
>> > to
>> > connection.ProtocolVersion = HttpVersion.Version11;
>> >
>> > ...the response time drops to 3ms.
>> >
>> > Anyone else experienced this? Surely this is a bug?
>> >
>> > Cheers,
>> > Simon
>> > --
>> > Simon Reavely
>> > simon.reavely@gmail.com
>> >
>>
>>
>>
>> Http 1.1 introduced keep-alive so multiple messages could be sent on a
>> single tcp connection. This looked like a good place to start looking
>> for issues. It actually might be easy to capture with wireshark. You
>> could capture a trace with http version 1.0 and one with 1.1 and look
>> to see if the connection is restarted by looking for tcp packets with
>> the syn flag set between your two ip addresses.
>>
>> Chris
>
>
>
> --
> Simon Reavely
> simon.reavely@gmail.com
>


Yep, you certainly could be the first person to be trying it :-)

It very well may be a bug. Are you using the latest version of thrift?
I'd even recommend trying out the svn version (I think thrift uses
svn, might use git though).

Btw, you shouldn't top post. Bottom posting makes it easier to follow
the flow of the conversation. I use the web based gmail editor most of
the time (as maybe you do) and its a bit of a pain that it defaults to
top posting when you reply to messages.

Chris

Mime
View raw message