I'm wondering if I can use haproxy for my problem: Is it possible for haproxy to: 1. read the first line of a tcp connection 2. in that line will be an ID. 3a. use the ID to lookup in a mem db what server to forward the TCP connection to. 3b. use the ID to lookup in a mem db what server to forward data to through an existing TCP connection. (1 connection per server to ha proxy)
Or: Is it possible for haproxy to: 1. read an http request for a http connection. 2. determine what server to foward to based on the page requested. 3. then allow generic tcp data (both upstream/downstream) on that connection (after the headers). I'm also entertaining the possibility of sticking a load balancer in front of multiple instances of a custom router process I create. So that the "header inspection" doesn't need to take place on the load balancer. I've also described the problem in more detail here: http://stackoverflow.com/questions/19914209/a-load-balancer-for-tcp-with-an-id-to-server-lookup-similar-to-a-chat-room-load -tim