C/S system development framework-Load Balancing)
C #. Net C/S system development framework, WebService architecture load balancing, loading balancing
The system of the WebService architecture is subject to the performance of the IIS server. When a large number of users are concurrent, the IIS server may crash. To solve this common problem, we can introduce the Server Load balancer technology. Server Load balancer can automatically allocate client requests to access different servers. Therefore, the pressure on a single IIS server is diverted. When one server crashes or a network failure does not affect user operations, the loadbalancing control program automatically searches for available Web servers to find or submit data again.
Server crash or Network Fault Handling Mechanism:
When the client calls a web method, it finds a server fault and the program automatically calls the web method of another server.
Server Load Balancing architecture:
Server Load balancer can be used in the following cases:
1. The client cannot be connected because the server crashes, and the program automatically connects to other servers.
2. When the server is running at a high load, the server sends a message to the client asking to connect to another server because I'm busy!
3. When the client calls a web method, the server fails and the program automatically calls the web method of another server.
4. Users in specified regions are connected to the specified web server.
Implementation ideas:
1. The client configuration file is used to configure the Server Load balancer web server. The main parameters are: Server Name and multiple WebService addresses.
2. Server Load balancer manager. A public class is designed to automatically find servers with normal communications.
3. Exception Handling Mechanism. For example, if the client finds a server fault when calling a web method, the program automatically calls the web method of another server.
4. the WebService factory is used to create a WebService client instance.
CS system framework-Load Balancing source code download
Http://www.csframework.com/archive/5/arc-5-20110604-1514.htm
CS system framework-Load Balancing (II)
Http://www.csframework.com/archive/5/arc-5-20110604-1513.htm