I have a virtual data layer cluster set up with a Netscaler load balancer. This virtual data layer dispatches queries for the client to different data sources and returns the data to the client. In Netscaler, my VIP uses the same weight of "1" for each node in the cluster (we have 2 nodes). This with the idea of maintaining the same number of queries going to each node in the cluster. The issue is that some days one node is underbalanced with queries and that same node the next day can be overloaded with queries. I checked the virtual layer logs and noticed that the SESSIONS are balanced; but a session can have an different number of queries. So, Netscaler sends equal number of sessions to the nodes but the server may end up processing more queries that the other. What we need to do is to balance the queries, not the sessions. So, my question, is there a way to differentiate between sessions and requests (or queries) in the Netscaler settings?
Asked
Active
Viewed 96 times
0
-
To clarify, you're using Netscaler to load-balance HTTP requests, correct? If you're already employing Session Affinity then you must be using some form of Cookie or `Authorization`-header based approach - please post your current Netscaler configuration. – Dai Jan 22 '21 at 03:21
-
Also, it's important to ensure that your application code is stateless - or at least, does not require webserver session affinity to function properly or perfomantly (e.g. if you're storing data in in-memory session state), if so, then you probably shouldn't switch to per-request load-balancing - but should first alter your application so it doesn't depend on session-affinity, and only afterwards switch to per-request. – Dai Jan 22 '21 at 03:22