1

I have 8 servers that are loadbalanced by NetScaler VPX (10). How to make NetScaler load balancer to resend request to next server if previous server responded with the 502 status?

Jonas
  • 337
  • 2
  • 10

2 Answers2

1

It all depends on your configuration. However, in all cases, it is not the NetScaler appliance itself which will retry to the next server. You'd have to create a construction in your configuration so that when the backend server returns a HTTP 502, the response to the client is rewritten to have the client retry the request. The new request which enters the NetScaler must be identified at that point, so you can force the backend server being used for that request.

An option is to configure the members of your server group with a server id, and use that server id to perform explicit load balancing. The initial failed response must then return a cookie containing the server id.

If the cookie is present on the second request, and holds a valid server id, then that backend server will be used.

In short, you would have to be using following components on NetScaler:

  • Content Switching (does the request have a server id cookie or not)
  • Load balancing with Server Id definitions for each service group binding
  • Rewrite of the response of the initial request.

If your application does not support redirects, you are out of luck as the NetScaler cannot retry the original request based on the original response from the first server.

Cheers, Jan

Jan
  • 121
  • 3
-1

You can use HTTP Call-out policy, according to this link

https://support.citrix.com/article/CTX122335