0 Replies Latest reply on Aug 21, 2018 6:47 PM by jasipher

    WildFly 10.1 standalone behind AWS ELB doesn't load balance

    jasipher

      I'm trying to get a remote EJB client (not running in WildFly) to make load-balanced calls to a stateless EBJ running in WildFly 10.1.Final behind an AWS ELB (classic load balancer), but I can't get the client to use more than one back end WildFly server. Things I've done so far...

       

      The client uses a pool of scoped EJB contexts and rotates through the pool as it makes requests. One context is removed from the pool every minute and a new one is added. The JVM's networkaddress.cache.ttl property is set to 30 seconds which should force a DNS lookup for each new connection, which (I thought) should send each new connection to a different WildFly EC2 instance behind the ELB. The problem appears to be that even though the scoped EJB context is closed, the underlying TCP connection is not closed and is re-used by the new scoped context.

       

      Is there a way to configure the EJB client to use multiple TCP connections when the WildFly server is running in standalone mode?

       

      UPDATE:

      Of course, 2 minutes after I posted this I had the bright idea to change the endpoint name in each scoped EJB context. That did the trick.