I´m currently evaluating WildFly.
Cool, let us know how it goes..
I´d like to run multiple WildFly instances load balanced with mod_jk.
Sure, you can also use mod_cluster project to integrate with load-balancer. See mod_cluster - JBoss Community .
Is it theoretically possible to set a specific count of maximum client connections to a particular server instance? Hence requesting clients above this threshold should not be able to connect to a restricted server and thus get load balanced to another instance if possible.
I don't see the use case yet, seems like an antipattern? Mod_jk will load-balancer in the round-robin fashion by default.
You might be able to hack around somehow, you could keep a desired track yourself in Undertow using HttpHandler implementation, and then use a rewrite rule, to forward requests that do not have any cookie session set to go only to the first node... anyway, hacky.