Author Topic: Traffic redirection based on HTTP header  (Read 1623 times)

Offline sanji_17

  • Contributor
  • *
  • Posts: 7
  • Karma: 1
Traffic redirection based on HTTP header
« on: October 19, 2008, 09:39:57 PM »
Hi All,

Have anyone encountered this?

I have a NS doing transparently CR and LB of backend cache-servers.
I need to redirect specific web-traffic to another router(Which is not my default router)?

E.g
All CR traffic hits(Non-Cacheable) goes to default router(192.168.1.1)
Other CR traffic hits(*.flv) goes to another router(10.0.0.1)

Any guys have a idea how this can be done??

Thanks!

Sanji

Offline jmelika

  • Administrator
  • Hero Member
  • *****
  • Posts: 341
  • Karma: 7
Re: Traffic redirection based on HTTP header
« Reply #1 on: October 20, 2008, 03:09:27 AM »
Sanji,

By router, do you mean a vserver or real server, or do you mean an actual layer 3 router?  I am not clear on the question, but it should be fairly easy to accomplish once we understand it...

I'll be moving this question to Q&A section instead of the Tips and Tricks.

JM

Offline sanji_17

  • Contributor
  • *
  • Posts: 7
  • Karma: 1
Re: Traffic redirection based on HTTP header
« Reply #2 on: October 20, 2008, 06:56:14 AM »
jmelika,

The router is a L3 router. Currently, for CR policy HITS(Non-cacheable traffic), NS is sending it to the original WWW through the default GW(192.168.1.1). I was wondering if I could defined another CR policy for *.flv extension and redirect this traffic to another router(10.0.0.1). Basically, I want *.flv traffic - NOT to be send to my LB farm, instead redirect it out to another router.

Thanks.

Sanji

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Traffic redirection based on HTTP header
« Reply #3 on: October 20, 2008, 07:36:16 AM »
You could use WCCP on the incomming router, After configuration the trafic will be redirected to the other router. But your incomming router would have to support it.

Could you?
 

Offline sanji_17

  • Contributor
  • *
  • Posts: 7
  • Karma: 1
Re: Traffic redirection based on HTTP header
« Reply #4 on: October 23, 2008, 08:05:32 AM »
Hi Evildani,

Could you describle further how this could be done? The incoming router supports wccp.
Thanks

sanji

You could use WCCP on the incomming router, After configuration the trafic will be redirected to the other router. But your incomming router would have to support it.

Could you?
 

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 18
Re: Traffic redirection based on HTTP header
« Reply #5 on: October 23, 2008, 04:00:41 PM »
In reading the original question, I'm not sure what you are asking.  If CR is enabled properly, the NS will send traffic NOT to the original web servers, but to the vserver specified for your cache servers.  It will route the traffic as appropriate--if the cache servers are behind the second router, and you have proper routes on the NS, then the NS will send the traffic through the second router.  It isn't about sending traffic to a router, it is about sending it to a cache server via a router.

The Oracle

Offline sanji_17

  • Contributor
  • *
  • Posts: 7
  • Karma: 1
Re: Traffic redirection based on HTTP header
« Reply #6 on: November 19, 2008, 06:26:12 AM »
Hi,

My setup as below: for transparent web-caching

Router-Switch
              |
         NetScaler
              |
          Switch     
              |
          Cache

The caches are pointing to the Netscaler owned ip address(MIP) as the default GW.
Part of the configs are below:

1) Currently, for web traffic that are a CR-HIT on CR policy, they are send to the origin server on the internet.
2) CR-Miss traffic will be LB to the caches.

For point 1, the CR-HIT traffic are redirect by NS to its default GW to route out to internet.
Is it possible to send CR-HIT traffic to another router2?

add cr policy bypass-flv
add cr vserver global_http HTTP -via OFF -cacheVserver cache-group -soPersistenceTimeOut 2 -reuse OFF
set cr vserver global_http -IPAddress * -redirect POLICY -cacheVserver cache-group -cltTimeout 180
bind cr vserver global_http -policyName bypass-flv

Hope this is clearer?
Thanks!

sanji


In reading the original question, I'm not sure what you are asking.  If CR is enabled properly, the NS will send traffic NOT to the original web servers, but to the vserver specified for your cache servers.  It will route the traffic as appropriate--if the cache servers are behind the second router, and you have proper routes on the NS, then the NS will send the traffic through the second router.  It isn't about sending traffic to a router, it is about sending it to a cache server via a router.

The Oracle