[
https://issues.jboss.org/browse/MODCLUSTER-390?page=com.atlassian.jira.pl...
]
Michal Babacek commented on MODCLUSTER-390:
-------------------------------------------
Very well, I've written an automated test that reflects the _comment #4_ and it
works:
h3. mod_cluster before the feature was implemented
Some initial requests, HTTP 200...
{code}
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.2
Session ID: 4VKyGpxfi2MvHCOKC4A-l-5i.jboss-eap-6.2
Session isNew: false
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.2
Session ID: 4VKyGpxfi2MvHCOKC4A-l-5i.jboss-eap-6.2
Session isNew: false
{code}
Now, let's use HTTP 201, the *failonstatus=201* setting...
{code}
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=201, response code = 201
HTTP Code was: 201
JVM route: jboss-eap-6.2
Session ID: 4VKyGpxfi2MvHCOKC4A-l-5i.jboss-eap-6.2
Session isNew: false
{code}
The response comes from the same node, that's fine, but the subsequent requests come
from that node as well, i.e. the feature is not implemented:
{code}
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.2
Session ID: 4VKyGpxfi2MvHCOKC4A-l-5i.jboss-eap-6.2
Session isNew: false
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.2
Session ID: 4VKyGpxfi2MvHCOKC4A-l-5i.jboss-eap-6.2
Session isNew: false
{code}
h3. current mod_cluster 1.2.9, feature implemented
Some initial requests, HTTP 200...
{code}
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.3
Session ID: cETRQkQtnJk9R0I4eaGaoril.jboss-eap-6.3
Session isNew: false
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.3
Session ID: cETRQkQtnJk9R0I4eaGaoril.jboss-eap-6.3
Session isNew: false
{code}
Now, let's use HTTP 201, the *failonstatus=201* setting...
{code}
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=201, response code = 201
HTTP Code was: 201
JVM route: jboss-eap-6.3
Session ID: cETRQkQtnJk9R0I4eaGaoril.jboss-eap-6.3
Session isNew: false
{code}
The response comes from the same node, that's fine, but the subsequent requests come
from a different node, i.e. the feature is implemented:
{code}
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.3-2
Session ID: cETRQkQtnJk9R0I4eaGaoril.jboss-eap-6.3-2
Session isNew: false
Trying to retrieve content from
http://192.168.122.204:2181/clusterbench/httpcode/?http_code=200, response code = 200
HTTP Code was: 200
JVM route: jboss-eap-6.3-2
Session ID: cETRQkQtnJk9R0I4eaGaoril.jboss-eap-6.3-2
Session isNew: false
{code}
h3. Regarding Status
As to your other question, the *jboss-eap-6.3* worker was in *NOTOK* for a period of time
just until the next *STATUS* message was received. After that, both *jboss-eap-6.3* and
*jboss-eap-6.3-2* have been in *OK* status.
So, what shall we do about it? I think it's probably all right.
1. I have a certain set of HTTP codes that I want to trigger a failover
2. it works, failover occurs (on the *second* request)
3. the worker is put back in business, because there is no reason to believe it's
broken, i.e. the fact that a web app returned a specific code does not suggest that the
whole box should be kept in *NOTOK*...
WDYT?
add failonstatus to mod_cluster
-------------------------------
Key: MODCLUSTER-390
URL:
https://issues.jboss.org/browse/MODCLUSTER-390
Project: mod_cluster
Issue Type: Enhancement
Affects Versions: 1.2.6.Final, 1.3.0.Final
Reporter: Jean-Frederic Clere
Assignee: Jean-Frederic Clere
Priority: Critical
Fix For: 1.2.8.Final, 1.3.1.Alpha3
Attachments: error_log.zip
The feature was added in httpd-2.2.17 in the mod_proxy_balancer we just need to copy that
code and find a way to configure it,
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)