we have session sticky configured based on a parameter of sessionid attached in http url in F5. we want to keep the existing connections to the same Tomcat server even when health check on it is failed? (failed when F5 gets from a web page with “MA” ). Set “Action on service down” to “none” , but when HTTP Redirect happens in the client , the F5 will treat it as new connection? is it possible to identify a connection based on the “sessionid” , just like session sticky rule?
I think the interesting part lies within: - “but when HTTP Redirect happens in the client , the F5 will treat it as new connection?”
Answer is no. Normally, a teardown of the existing TCP connection does not occur upon a HTTP redirect EXCEPT when the redirect response has a “Connection: Close” header. Assuming it’s an App that uses modern version of HTTP (HTTP/1.1 or Speedy), then multiple HTTP redirects can occur on top of the same TCP session.
What to do?
-
Verify if the
Connection: Closeheader is included in a HTTP redirect response which specifies the
Location: https://the.sameapp.com/new-pathheader (use Chrome or FF DevTools)
I think the interesting part lies within: - “but when HTTP Redirect happens in the client , the F5 will treat it as new connection?”
Answer is no. Normally, a teardown of the existing TCP connection does not occur upon a HTTP redirect EXCEPT when the redirect response has a “Connection: Close” header. Assuming it’s an App that uses modern version of HTTP (HTTP/1.1 or Speedy), then multiple HTTP redirects can occur on top of the same TCP session.
What to do?
-
Verify if the
Connection: Closeheader is included in a HTTP redirect response which specifies the
Location: https://the.sameapp.com/new-pathheader (use Chrome or FF DevTools)
Thanks for the answer; we did a tcpdump on the client, and found that when redirect happened, the TCP port used by the client changed, would it be identified by F5 as a new TCP connection?
Thanks for the answer; we did a tcpdump on the client, and found that when redirect happened, the TCP port used by the client changed, would it be identified by F5 as a new TCP connection?
Yes, a new TCP connection, however your persistence (session sticky is the name used by Cisco ACE and others Cisco stuff) is based in layer 7 information. If the request made to follow the redirect uses the same sessionid, that new connection will persist to the same server (so no new load balance decision).
Yes, a new TCP connection, however your persistence (session sticky is the name used by Cisco ACE and others Cisco stuff) is based in layer 7 information. If the request made to follow the redirect uses the same sessionid, that new connection will persist to the same server (so no new load balance decision).
In sunny days, the session sticky rule works fine, even for redirect. but when a web server is forced to “MA” status(a jsp file monitored by Health monitor), the connection was dropped when redirect request happen.
is it possible to make a tomcat server to offline automatically and no impact to the existing connections with session sticky configured?
In sunny days, the session sticky rule works fine, even for redirect. but when a web server is forced to “MA” status(a jsp file monitored by Health monitor), the connection was dropped when redirect request happen.
is it possible to make a tomcat server to offline automatically and no impact to the existing connections with session sticky configured?
I believe what you are looking for is Clustering/session replication at the Tomcat level (see http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html). The JSESSIONID for the session is independent of the token used for server stickiness. If the F5 identifies a pool member is unavailable then it will push the requests to the next appropriate pool member. The request will be sent to the new member with the JSESSIONID from the previous Tomcat server. Since you have now clustered your Tomcats the JSESSIONID will be honored in the new server and the user should not know they are on a different Tomcat instance.
I believe what you are looking for is Clustering/session replication at the Tomcat level (see http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html). The JSESSIONID for the session is independent of the token used for server stickiness. If the F5 identifies a pool member is unavailable then it will push the requests to the next appropriate pool member. The request will be sent to the new member with the JSESSIONID from the previous Tomcat server. Since you have now clustered your Tomcats the JSESSIONID will be honored in the new server and the user should not know they are on a different Tomcat instance.
“is it possible to make a tomcat server to offline automatically and no impact to the existing connections with session sticky configured?” Yes, you just need to disable the pool member via monitor, and not mark it down (offline) via the monitor.
From the pool members page in the pool:
Enabled (All traffic allowed)
Disabled (Only persistent or active connections allowed)
Forced Offline (Only active connections allowed)
In the monitor configuration you want the “MA” string in the “Receive Disable String”, and I guess you have now in the “Receive String”.
“is it possible to make a tomcat server to offline automatically and no impact to the existing connections with session sticky configured?” Yes, you just need to disable the pool member via monitor, and not mark it down (offline) via the monitor.
From the pool members page in the pool:
Enabled (All traffic allowed)
Disabled (Only persistent or active connections allowed)
Forced Offline (Only active connections allowed)
In the monitor configuration you want the “MA” string in the “Receive Disable String”, and I guess you have now in the “Receive String”.
Is it possible to disable/enable a pool member automatically according to “Receive String”? Script or any control API can be used to achieve this?
Is it possible to disable/enable a pool member automatically according to “Receive String”? Script or any control API can be used to achieve this?