How will you design a proxy server that supports HTTP 1.1 keep-alive completely?
It seems even nginx only half supports HTTP 1.1 keep-alive requests:
It is an HTTP/1.0 proxy without the ability for keep-alive requests yet. (As a result, backend connections are created and destroyed on every request.) Nginx talks HTTP/1.1 to the browser and HTTP/1.0 to the backend server. As such it handles keep-alive to the browser. (source)
Were it you,how would you implement this?
The hardest part I think is how to make the response 开发者_StackOverflowthe same order as requested in keep-alive mode.
精彩评论