git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] http: add option to enable 100 Continue responses

From
Shawn Pearce <spearce@spearce.org>
Date
Oct 10, 2013, 08:14 UTC
Message-ID
<CAJo=hJtBapzmF7BEawwRGJ0NKH1W0J5P4c4iGK6G_==gZahhgg@mail.gmail.com>
In-Reply-To
<20131010013547.GA62549@vauxhall.crustytoothpaste.net>

On Wed, Oct 9, 2013 at 6:35 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 14 quoted lines
> On Wed, Oct 09, 2013 at 05:37:42PM -0400, Jeff King wrote:
>> On Wed, Oct 09, 2013 at 02:19:36PM -0700, Shawn O. Pearce wrote:
>> > 206b099 was written because the Google web servers for
>> > android.googlesource.com and code.google.com do not support
>> > 100-continue semantics. This caused the client to stall a full 1
>> > second before each POST exchange. If ancestor negotiation required
>> > O(128) have lines to be advertised I think this was 2 or 4 POSTs,
>> > resulting in 2-4 second stalls above the other latency of the network
>> > and the server.
>>
>> Yuck.
>
> Shame on Google.  Of all people, they should be able to implement HTTP
> 1.1 properly.
Heh. =)

If a large enough percentage of users are stuck behind a proxy that doesn't support 100-continue, it is hard to rely on that part of HTTP 1.1. You need to build the work-around for them anyway, so you might as well just make everyone use the work-around and assume 100-continue does not exist.

100-continue is frequently used when there is a large POST body, but those suck for users on slow or unstable connections. Typically the POST cannot be resumed where the connection was broken. To be friendly to users on less reliable connections than your gigabit office ethernet, you need to design the client side with some sort of chunking and gracefully retrying. So Git is really doing it all wrong. :-)

Properly using 100-continue adds a full RTT to any request using it. If the RTT time for an end-user to server is already 100-160ms on the public Internet, using 100-continue just added an extra 160ms of latency to whatever the operation was. That is hardly useful to anyone. During that RTT the server has resources tied up associated with that client connection. For your 10-person workgroup server this is probably no big deal; at scale it can be a daunting additional resource load.

Etc.

Even if you want to live in the fairy land where all servers support 100-continue, I'm not sure clients should pay that 100-160ms latency penalty during ancestor negotiation. Do 5 rounds of negotiation and its suddenly an extra half second for `git fetch`, and that is a fairly well connected client. Let me know how it works from India to a server on the west coast of the US, latency might be more like 200ms, and 5 rounds is now 1 full second of additional lag.

Previous: Jeff KingNext: brian m. carlson
Message 8 of 11 in “HTTP GSS-Negotiate improvements”
  1. 0/2 HTTP GSS-Negotiate improvementsbrian m. carlson, Oct 8, 2013
  2. 1/2 http: add option to enable 100 Continue responsesbrian m. carlson, Oct 8, 2013
  3. Jeff KingOct 9, 2013
  4. Shawn PearceOct 9, 2013
  5. Jeff KingOct 9, 2013
  6. brian m. carlsonOct 10, 2013
  7. Jeff KingOct 10, 2013
  8. Shawn PearceOct 10, 2013
  9. brian m. carlsonOct 11, 2013
  10. Shawn PearceOct 12, 2013
  11. 2/2 Update documentation for http.continue optionbrian m. carlson, Oct 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.