valyala / httpteleport

Transfer 10Gbps http traffic over 1Gbps networks :)
MIT License
458 stars 38 forks source link

Doesn't out of order responses break HTTP? #2

Closed kellabyte closed 7 years ago

kellabyte commented 7 years ago

Why does the README talk about supporting out of order responses and avoiding the head-of-line problem? Won't that break existing HTTP clients? I'm probably just misunderstanding :)

valyala commented 7 years ago

httpteleport client and server use custom protocol which is incompatible with HTTP, so existing HTTP clients cannot talk to httpteleport servers.

The httpteleport client generates an unique id for each request and prepends the request by this id before sending to the remote server. The remote server prepends each response with the request id, so the client could properly associate received responses with sent requests.

valyala commented 7 years ago

HTTP client usually talks to HTTP proxy:

HTTP client <- HTTP protocol -> HTTP proxy, that uses httpteleport client for proxying reuqests to the server <- httpteleport protocol -> httpteleport server