![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have an application running on two different web servers (as a backup of each other but not in cluster mode) with SSL enable. The DNS will serve the web servers in a round robin fashion, say I will have www.<a_domain>.com point to www1.<a_domain>.com and www2.<a_domain>.com. I am thinking to use an application level variable on each server to remember which web server was last served and then the next one will be served, ie. if (application.Get(lastServer).ToString() = "www1.<a_domain>.com") response.redirect(https://www2.<a_domain>.com/main.aspx); Should I do somethind like this? Is there any issue / problem you see? TIA |
#3
| |||
| |||
|
|
I'd avoid this approach - by the time you send a response back to the client and have the client return to the other server, you might have had time to finish processing the first request. Before you make any changes to improve performance I'd run some tests and get some benchmark performance numbers to measure against - you might even find out your app meets all the performance requirements! -- Scott http://www.OdeToCode.com/blogs/scott/ On Sun, 26 Jun 2005 23:47:28 +0800, <dl> wrote: Hi I have an application running on two different web servers (as a backup of each other but not in cluster mode) with SSL enable. The DNS will serve the web servers in a round robin fashion, say I will have www.<a_domain>.com point to www1.<a_domain>.com and www2.<a_domain>.com. I am thinking to use an application level variable on each server to remember which web server was last served and then the next one will be served, ie. if (application.Get(lastServer).ToString() = "www1.<a_domain>.com") response.redirect(https://www2.<a_domain>.com/main.aspx); Should I do somethind like this? Is there any issue / problem you see? TIA |
#4
| |||
| |||
|
|
the reason I want to do this is to avoid user session being redirect to a different web server and this would cause a problem with the SSL, wouldn't it? |
#5
| |||
| |||
|
|
Two options come to mind for SSL: One is to get a 'wildcard certificate', this is where the SSL cert has an * in the left most part of the common name (w*.odetocode.com would match www1.odetocode.com and www2.odetocode.com), and load balancing works. Another option is to buy one of the many hardware load balancers that support 'stick SSL sessions'. It will keep SSL clients returning to the same server. -- Scott http://www.OdeToCode.com/blogs/scott/ On Mon, 27 Jun 2005 10:08:19 +0800, <dl> wrote: the reason I want to do this is to avoid user session being redirect to a different web server and this would cause a problem with the SSL, wouldn't it? |
#6
| |||
| |||
|
|
For option One, have you tried this 'wildcard certificate' before? will it works? In addition to this, I guess I will have to configure cookieless = true. Right? |
#7
| |||
| |||
|
|
On Tue, 28 Jun 2005 00:07:48 +0800, <dl> wrote: For option One, have you tried this 'wildcard certificate' before? will it works? In addition to this, I guess I will have to configure cookieless = true. Right? Yes - wildcard certificates do work. You could always generate your own cert with Windows certificate services to try it out in your specific environment. Are you setting cookieless for session state? In a clustered environment what you'll need to do is use an ASP.NET State service or store session data in the database - the cookies will be fine, though. -- Scott http://www.OdeToCode.com/blogs/scott/ |
#8
| |||
| |||
|
|
Hi Scott Sorry that I have left this thread for couple days. I have setup a default.htm to do the redirect to "https://...", it works but this is not my prefer setup! Can you point me to some reference on this State service? database would be too costly at this stage ![]() TIA |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |