cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
478
Views
0
Helpful
4
Replies

Is there a way to direct requests based on HTTP return-code checking?

qixie
Level 1
Level 1

I'd like to implement a policy based on return-code. The algorithm is as below,

If HTTP return-code == 500 to 600

serverfarm1

else

serverfarm2

We have a CSM V3.2. Can someone tell me if this is doable? If yes, would you please tell me how.

Appreciation, Q.Xie

4 Replies 4

Gilles Dufour
Cisco Employee
Cisco Employee

it is feasible in 2 steps.

1- create an HTTP probe that will check the server status and if the response is between 500-600 mark the server as down.

2- use a backupserverfarm to use when all servers from the main serverfarm are down.

There is no way to redirect a connection based on the server response.

Regards,

Gilles.

Thanks for rating this answer.

Gilles, Thanks for your help.

I might not explain clearly what I wanted. We want to do the failover per application not the whole server site. For example, if an application on San Jose down, I'd like to re-direct this particular application to RTP's servers, if its return code is 500-600. The method you recommended will bring the whole server down and switch to backup servers which is not what we want. Hope it's clear this time. Please help!

Thx,Q.Xie

The solution I suggested is still what I recommend.

What you have to do is split your serverfarm in multiples instances. One for HTTP and another one for the rest of your applications. Or you could do one for each application.

The serverfarm for HTTP will have the HTTP probe and will go down when the response is 500-600.

The other serverfarm(s) will not use the same HTTP probe and should not go down based on the response code.

ie:

serverfarm WEB

real 10.10.10.10

ins

real 20.20.20.20

ins

probe http

serverm ALL

real 10.10.10.10

ins

real 20.20.20.20

ins

no probe

vserver web

vip 1.1.1.1 tcp 80

serverfarm WEB backup WEB_B

...

vserver all

vip 1.1.1.1 any

serverfarm ALL

Hope this helps.

Gilles.

Thanks for rating this answer.

Gilles, Thx a lot.

Your suggestion probably works. I will test it and let you know.

Q.Xie

Review Cisco Networking for a $25 gift card