The client request would be GET http://:/service_status.html, where ipaddress is the ip address of the webportal server (for our test case webportal-b-01 is 1.1.1.60 and port is 8080, 8081 or 8082).
Typically the webservice would running, so you would expect an HTTP status code of 200 OK and the text “Service Status is GOOD” or “Service Status is MAINTENANCE”. Also, typically if the webservice is down, you’d expect a Connection refused. However, on our webportals port 8080 is a special case that employs redirection by default if a URL is not found, so we must handle that case, even though this will not be the norm.
For the redirect case to webportal-b-01, the client request is GET http://1.1.1.60:8080/service_status.html. The expected response is:
Status code: 302 Found (this means redirect). The response header will contain Location: http://quotes.esignal.com/service_status.html. I’m not sure how the F5 interprets that, but it should treat it as an error. The only response that the F5 should treat as correct is an HTTP status code of 200 OK with the text “Service Status is GOOD”.
Here’s what the wget command shows when using port 8080 which is the redirection case. When browsers receive a HTTP status code of 302 , they know this is a redirect and will perform a GET on the Location specified in the response. In this case, another HTTP status code of 302 is received which causes the browser to redirect again to another Location. The bottom line is that “Service Status is GOOD” was not seen, so this webservice should be marked something like unavailable in the pool.
[root@webportal-b-01 ~] wget -S http://12.1.1.60:8080/service_status.html
--2016-08-15 09:17:21-- http://12.1.1.60:8080/service_status.html
Connecting to 12.1.1.60:8080... connected.
HTTP request sent, awaiting response...
HTTP/1.0 302 Found
Server: Resin/4.0.47
Location: http://quotes.esignal.com/service_status.html
Content-Type: text/html; charset=utf-8
Content-Length: 83
Date: Mon, 15 Aug 2016 13:17:21 GMT
Location: http://quotes.esignal.com/service_status.html [following]
--2016-08-15 09:17:21-- http://quotes.esignal.com/service_status.html
Resolving quotes.esignal.com... 216.216.216.62, 216.23.224.51
Connecting to quotes.esignal.com|216.216.216.62|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.0 302 Found
Server: Resin/4.0.47
Location: http://quotes.esignal.com/esignalprod/quote.action?s=%24INDU
Content-Type: text/html; charset=utf-8
Content-Length: 98
Date: Mon, 15 Aug 2016 13:17:21 GMT
Location: http://quotes.esignal.com/esignalprod/quote.action?s=%24INDU [following]
--2016-08-15 09:17:21-- http://quotes.esignal.com/esignalprod/quote.action?s=%24INDU
Connecting to quotes.esignal.com|216.216.216.62|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.0 200 OK
Server: Resin/4.0.47
Cache-Control: no-cache
Content-Language: en-US
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Set-Cookie: JSESSIONID=aaa1IdB1_zHqf8pYt-vvv; path=/
Content-Type: text/html; charset=ISO-8859-1
Date: Mon, 15 Aug 2016 13:17:21 GMT
Length: unspecified [text/html]
Saving to: “service_status.html.3”
The file service_status.html.3 contains the output from http://quotes.esignal.com/esignalprod/quote.action?s=%24INDU and is not included in this email since it’s not important.
Here’s what the wget command shows when using port 8082 which is the MAINTENANCE case:
[root@webportal-b-01 ~] wget -S http://12.1.1.60:8082/service_status.html
--2016-08-15 09:17:03-- http://12.1.1.60:8082/service_status.html
Connecting to 12.1.1.60:8082... connected.
HTTP request sent, awaiting response...
HTTP/1.0 200 OK
Server: Resin/4.0.47
ETag: "8JEDuEjxaX8"
Last-Modified: Wed, 03 Aug 2016 21:49:14 GMT
Accept-Ranges: bytes
Content-Type: text/html; charset=utf-8
Content-Length: 31
Date: Mon, 15 Aug 2016 13:17:03 GMT
Length: 31 [text/html]
Saving to: “service_status.html.1”
The contents of service_status.html.1 is:
Service Status is MAINTENANCE
Here’s what the wget command shows when using port 8081 which is the GOOD case:
[root@webportal-b-01 ~] wget -S http://12.1.1.60:8081/service_status.html
--2016-08-15 09:17:06-- http://12.1.1.60:8081/service_status.html
Connecting to 12.1.1.60:8081... connected.
HTTP request sent, awaiting response...
HTTP/1.0 200 OK
Server: Resin/4.0.47
ETag: "/DVXm7k+RfC"
Last-Modified: Wed, 03 Aug 2016 21:31:19 GMT
Accept-Ranges: bytes
Content-Type: text/html; charset=utf-8
Content-Length: 24
Date: Mon, 15 Aug 2016 13:17:06 GMT
Length: 24 [text/html]
Saving to: “service_status.html.2”
The contents of service_status.html.2 is:
Service Status is GOOD