Forum Discussion

Suraj_25258's avatar
Suraj_25258
Icon for Nimbostratus rankNimbostratus
Apr 06, 2009

HTTP Redirection with Big-IP

Hi,

 

I have a scenario where a webpage, say www.mysite.com is accessed and it is routed to a set of web application servers via a Big-IP. A lookup is done in the web application server against a Database using Java/JSP/Servlets and based on the lookup results the request is forwarded to another set of web application servers via BIG-IP (i.e. another website domain).

 

 

I have the following questions wrt this?

 

 

1. How many BIG-IPs do I need here? Is one Big-ip enough?

 

2. How do I pass the user session information using Java code when an user first logs into www.mysite.com and then is finally redirected to the other website domain. We are not planning to use session persistence.

 

 

Any replies will be greatly appreciated.

 

 

Thanks,

 

Suraj

 

 

5 Replies

  • Hi Suraj,

     

     

    From a design perspective, one BIG-IP is enough (not considering redundancy). You can do what is referred to as a "bounceback" virtual server in the documentation (some caveats with SNAT depending on what subnet the web servers are on versus the app servers). Of course, depending on traffic levels, it may be better to have 2 separate tiers of BIG-IP if throughput is an issue.

     

     

    Not sure I understand your question 2, does the web application not already pass the java code to the app tier in some manner?

     

     

    Denny
  • Thanks Denny.

     

     

    For 2 , since for www.mysite.com, the Java code is checking against the DB and validating, when the request is passed on to the second Big-Ip, how is the user session maintained?

     

     

    Also, I have another question related to this: Can Big-Ip read/write to cookies using scripts?
  • For question 2, you'll need to insert something that the bigIP can recognize to track user sessions between different pairs. I've done this with cookies, inserting one at the web tier to be read and removed at the app tier, and vice versa, inserted at the app tier and read and removed at the webtier. Mostly I did this for troubleshooting, as there really wasn't a long-term need for me to track sessions at the web tier, only at the app tier.

     

     

    Yes, big-ip can read/write/insert/sanitize/replace/remove etc with cookies. Check out the HTTP::cookie wiki page:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__cookie.html Click here

     

     

    HTH...Jason
  • BTW, if by scripts, you mean iRules, then yes to my last comment about the HTTP::cookie command.