Distributed Load Balancing cluster

Stand-alone mode

For example, there is an online store system, if this system is very small business, such as students write their own just a small project, all the code in a store-web project, and then put this project deployed on a single server . The entire project all the services provided by this server, which is a stand-alone structure.

Cluster Mode

If the traffic increases, a server has been unable to handle the current amount of data can be used trunked mode. Simple cluster model, it is a project the same code on multiple servers, each server is a node of the plurality of servers, all nodes constitute a cluster. That each server ran the same project code (ie, store-web). This is performed by assigning a large number of requests to different nodes, the processing capacity of the system can be improved. It has a theoretical processing power of the number of nodes in the system will be able to upgrade many times.

There is a problem is how a large number of requests to different nodes in the cluster to perform. This would involve load balancing technology.

Load Balancing

Load balancing server plays the role of scheduler, all requests are first received by the user which, according to the load dispatcher then requests each server assigned to a server for processing. Load balancing server how rational allocation of tasks to ensure that all back-end server performance will give full play to maintain the best overall performance server cluster, which is load balancing problem.

Load balancing classic four ways:

  • HTTP redirect load balancing
  • DNS Load Balancing
  • Reverse Proxy Load Balancing
  • Load balancing component

Distributed Architecture

Or the online store, if a distributed architecture, you can not all of a business into a store-web project. Necessary function module according to an exploded service, each service configured to run a separate sub-system, all subsystems or between RPC MQ, etc. communicate with each other, call subsystem / dependence to perform all functions of another online store system. For example, online store system (store-web) can be divided into: single sign-on system (storelogin-service), ordering system (storeorder-service), a shopping cart system (storecar-service), the search system (storesearch-service), information management system (stroremng-service) and the like.

Guess you like

Origin www.cnblogs.com/fan-1994716/p/11923301.html