Quantcast
Viewing all articles
Browse latest Browse all 5112

Question about Keep-Alive behaviour (no replies)

Hi,

I'm hoping to experiment with enabling keep-alive on my service, but the
documentation isn't entirely clear for my use case, the general
implementation is as follows:

1) A HTTP request comes in
2) A LUA script grabs the request body, does some analysis on it, and
injects a Cookie: header into the request
3) The request goes to a backend, where the cookie is used to determine the
server the request should be dispatched too.

This behaviour seems to work fine with the http-server-close or httpclose
options, but I'm not entirely sure what would happen in a keep-alive
session when the backend server switches. I've set http-reuse to 'safe'
but when the second request goes to a different backend server to the
first, what happens to the original socket on the first server? Will it be
reused by other connections or does it just get dropped in a 1:1 mapping
style? Given that it's rare that two subsequent requests on a single
connection will arrive at the same server, is it even worth having
keep-alive support on the backends?

Hopefully you guys can help.

Thanks!

--
Craig McLure

Viewing all articles
Browse latest Browse all 5112

Trending Articles