I followd this article https://docs.jboss.org/author/display/WFLY10/EJB+invocations+from+a+remote+server+instance to remote connect a web client to an EJB server, but in my case I use the domain mode instead of standalone.
The example works fine for 10 or 20 connections but the problem is when the servers receive a lot of connections. For example, if I do 1000 simultaneous requests to a simple web page that don't use EJB, the server receive the requests and answer normally, but if I do that same 1000 request to a web page that use a remote EJB, the server lock all requests and does not respond any request, even for a single web page that does not use remote EJB.
The server log says:
EJBCLIENT000016: Channel Channel ID d142ac84 (outbound) of Remoting connection 3fce8fd9 to localhost/127.0.0.1:8080 of endpoint ... <5c80cf32> can no longer process messages
I think the remote-http-connector does not work like the normal http requests that enqueue the requests. I tried some configurations, like increase the number of io threads and the max task threads and the results was great, but if the number of requests is grater than the number of io threads, the server lock and freeze all the requests.
Actually I'd like to configure a queue for the remote ejb requests, but apparently Wildfly does not accept this feature for the remote ejb connections and lock the server when it receive a lot of connections.