Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-8304

HotStandBy Worker shouldn't became session owner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 7.1.0.DR10
    • mod_cluster, Undertow
    • None

      HotStandby worker should be used(routed to) only when all other "normal" workers are unavailable.
      When using Eap7+ as workers there is an issue of session owner.
      Fail of the worker that is handling current request will result in failover of the request
      to another node and as the failed worker cannot be session owner anymore, new owner will be chosen. At this point hotstandby worker can become session owner and therefore next request will be routed to it.

      Reproduce

      1. Set up balancer(httpd or undertow) with one hotstandby worker (load: 0) and 4 normal workers
      2. Send request to balancer to create session with one of the workers
        curl -c cookie.txt -b cookie.txt 192.168.122.88:2080/clusterbench/jvmroute -v
      3. Kill worker that handled the request
      4. Send another request to the balancer
        [root@localhost backup]# curl -c cookie.txt -b cookie.txt 192.168.122.88:2080/clusterbench/jvmroute -v
        [root@localhost backup]# curl -c cookie.txt -b cookie.txt 192.168.122.88:2080/clusterbench/jvmroute -v
        * About to connect() to 192.168.122.88 port 2080 (#0)
        *   Trying 192.168.122.88...
        * Connected to 192.168.122.88 (192.168.122.88) port 2080 (#0)
        > GET /clusterbench/jvmroute HTTP/1.1
        > User-Agent: curl/7.29.0
        > Host: 192.168.122.88:2080
        > Accept: */*
        > Cookie: JSESSIONID=C_tXL_DySOH6vYzPKKBl6vzVBSDQsUp1Ekhhpxyf.jboss-eap-7.1-2
        > 
        < HTTP/1.1 200 OK
        < Date: Tue, 17 Jan 2017 08:37:54 GMT
        < Server: JBoss-EAP/7
        < X-Powered-By: Undertow/1
        * Replaced cookie JSESSIONID="C_tXL_DySOH6vYzPKKBl6vzVBSDQsUp1Ekhhpxyf.jboss-eap-7.1" for domain 192.168.122.88, path /clusterbench, expire 0
        < Set-Cookie: JSESSIONID=C_tXL_DySOH6vYzPKKBl6vzVBSDQsUp1Ekhhpxyf.jboss-eap-7.1; path=/clusterbench
        < Content-Type: text/plain;charset=UTF-8
        < Content-Length: 15
        < Connection: close
        
      5. Watch change of the sessionId and session owner, or send few more requests to see who won the lottery
        It is not 100% reproducible but the change is quite high, should be reproducible with 3 workers too i`ve just tried 4

            rhn-engineering-rhusar Radoslav Husar
            bsikora Bogdan Sikora (Inactive)
            Bogdan Sikora Bogdan Sikora (Inactive)
            Bogdan Sikora Bogdan Sikora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: