On 8/17/10 4:13 PM, Cyril Bonté wrote:
Le mercredi 18 août 2010 00:32:55, Turlapati, Sreenivasa a écrit :
Hi,

We are not trying to load balance across our databases.
We got simple client - server architecture.
Here is the brief description . when the application users logged into the
Front End(Client) they do certain actions based on their privileges. When
the user does the action the FE connect to the backend process. The
backend does all the business logic and send the response back to the FE.

As the user base has increased tremendously, we are planning to run 5 to 10
instance of the backend process and employ the HAProxy load balancer.

We want to load balance the requests through the user id and based on the
action what he did at the FE. ( The FE sends the user id , action name
etc to the backend process).

We plan to create to set of backend groups where we want to route the
action A&  C to group A and action B&  D to group B. So we have to scan or
read our incoming request in Haproxy and employ the rules to route to
different groups based on what action/request the user did in FE.

 From what you said, a simpler design could be to manage this logic in the
client side.
- group A and group B are 2 proxies on different ports in your HAProxy
instance, with their own backend servers.
- in your client,
* action A&  C connects to the group A port.
* action B&  D connects to the group B port.

This looks less tricky than analyzing the TCP traffic.

But by phrasing it this way "This looks less tricky than analyzing the TCP traffic." it will allow them to continue to think that it may be "tricky", but still possible, in haproxy to regex match on arbitrary portions of the data stream with a stock 1.4.x haproxy. Which it is not - unless I missed a major code commit (or if they are really using http not mysql protocol).


--
Cyril Bonté


Reply via email to