ASP session Management in load-balanced environment (turn) (ii)

Source: Internet
Author: User
Tags relative sessions dedicated server
Load balance only when first click in Web-wide
This method, also known as front-end load balancing, is easy to describe, but may not be suitable for execution. To achieve true load balancing, each
Requests are rebalanced to the user. In most cases, however, front-end load balancing is sufficient to accommodate most of these server-maintained
Supporters.

To do this, only allow the first click in the range through the load balancer. Each additional page load keeps the user
On the same server. This is as simple as using a relative path in your code rather than an absolute path.

< Form action= "http://www.myserver.com/mypage.asp" Method=post >

Become

< Form action= "/mypage.asp" Method=post >

Using a relative path in the action tag, the user stays on the same network server throughout the entire process of accessing your site.
So their session sets are together with them in the same time. There is no doubt that this will make your load-balancing plan subject to
A certain loss, because you only have one chance to decide where to handle the user's load and know how much traffic they will generate
The decision will be made before. But in most cases, because sessions is allowed, this approach is close to implementing a complete
Performance.

However, this is not the only problem: In some cases, this is not an appropriate approach. For example, your application requires the user to leave
The current server, to a dedicated server, such as email, search, or secure server, is not the way to go.
Also, if a user sets a page as a bookmark, or tries to send the URL to a friend, they may want to get a specific machine
Address to further weaken your load-balancing plan. Finally, if the machine breaks down, all the user information is not recoverable and is lost.
It does not have a failed recovery feature.



Which is the best method?


The answer to this question can be imagined: "Look at the situation." Other factors to consider include:

0 Click rate of your site how high;
0 How much state information you want to keep;
0 if you have a dedicated server for use;
0 if you want to use Third-party components to process the valuable parts of your site.

If your site traffic is too large, then accurate load balancing for the success of the site is very important, then do not sessions
Programming, or using a Third-party component such as session Pro or Microsoft's site server, is feasible. If there is a small amount of traffic, or
Only need to save less state information, then using cookies or only the front-end load balance is more feasible.

In general, you should consider these issues fully before you set up your site. Decide what method to use to combine each page of the site,
Any delay can result in the redo of the main part, which may cause the entire site to be completely reconstructed. Determine what the site is now and will have in the future
Needs, and then decide how to deal with the sessions problem.





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.