Load balancer with custom routing rule implemented in Java?
<p>I'm looking for a way to set up a simple load balancer with a custom routing rule implemented in Java. The custom routing rule is looking up the destination based on a cookie sent by the request. The destination must be retrieved on each request as it may change over time. Therefore, I can't generate static routing rules in advance.</p>

<p>I would prefer implementing the custom routing rule in Java as I already have all logic in place to figure out the destination based on the cookie. However, I can't find a load balancer allowing to plugin a custom routing rule implemented in Java. Any hints?</p>

<p>I don't want to implement a router in Java from scratch, but only provide the routing logic. Is that possible?</p>

<p>I'm not talking about hardware. I want to extend a software load balancer like <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html" rel="nofollow">http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html</a></p>
