Forum Discussion
taro_112311
Nimbostratus
Nov 07, 2007Can http monitor use Keep-Alive?
Is the connection reused when specified "Connection:Keep-Alive"?
Should I specify "Connection:Close"?
5 Replies
- hoolio
Cirrostratus
Yes, and yes. To close the connection, you can use a send string like this:
GET /path/to/file.html\r\nHost: example.com\r\nConnection: close\r\n
Aaron - taro_112311
Nimbostratus
Is it correct in the following understanding?
Specifying "Connection:Keep-Alive" is efficient, because the connection established first keeps being used. - hoolio
Cirrostratus
Sorry, I mis-read your original question. I know that the connection to the server can be kept open if the Connection: close isn't used, and that this can leave connections open for longer than necessary, but I don't know whether LTM would ever re-use it if it's still open. I'll try testing to see.
Aaron - hoolio
Cirrostratus
Testing on 9.2.x, I see LTM selecting a new port regardless of the send string configuration, which I guess follows with the recommendation to use the Connection: close header to tell the server to close the TCP connection.
Aaron - Deb_Allen_18Historic F5 AccountThanks for clarifying, Aaron.
It was my understanding as well that LTM would not re-use a monitor connection even if it was specified as a Keep-Alive connection.
Best practice is to specify either HTTP 1.0 or Connection: Keep-Alive to keep the connection to the server from remaining open longer than necessary.
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
