Popular explanations of "cluster and load balancing" etc.

In the era when the concepts of "high concurrency, massive data, distributed, NoSql, cloud computing..." are flying all over the sky, I believe that many friends have heard of and even often mentioned " cluster , load balancing ", etc., but not Everyone has the opportunity to really come into contact with these technologies, and not everyone really understands these "sounding great" technical terms. Let's briefly explain it below.   Cluster (Cluster)
     

  The so-called cluster refers to a loosely coupled multi-processor system composed of a group of independent computer systems, which realize inter-process communication through the network. Application programs can transmit messages through network shared memory to realize distributed computers. In layman's terms, it is to let several computers work together (service), either in parallel or as a backup.

  Load Balance

Network load balancing is a dynamic balancing technology. The common way to achieve this is to analyze data packets in real time through some tools, grasp the data flow status in the network, and allocate tasks in a reasonable and balanced manner. Based on the existing network structure, this technology provides a cheap and effective method for expanding server bandwidth and increasing server throughput, strengthens network data processing capabilities, and improves network flexibility and availability. "Load balancing" can be seen everywhere in daily life. A supermarket's revenue staff can only serve 10 customers during the peak period . When there are 20 customers in need of service during an event, there may be long queues, so the shopping experience will be Very poor (like customers complaining that the system/website access is too slow). The easiest way is to recruit another salesperson and reopen an exit. The core of load balancing is "sharing pressure".


  Large-scale clusters usually have the following characteristics:
  (1) High reliability (HA).
      Using cluster management software, when the primary server fails, the backup server can automatically take over the work of the primary server and switch over in time to achieve uninterrupted service to users.
  (2) High performance computing (HP).
      That is to make full use of the resources of each computer in the cluster to realize the parallel processing of complex operations, which is usually used in the field of scientific computing, such as genetic analysis and chemical analysis.
  (3) Load balancing (LB).
      That is, the load pressure is reasonably distributed to each computer in the cluster according to a certain algorithm to reduce the pressure on the main server and reduce the hardware and software requirements of the main server.

      Of course, the above characteristics need to be possessed at the same time in some adaptation occasions. The commonly used clusters are divided into the following types:  load balance cluster (load balance cluster)   A total of four brothers open tailor shops, the business is particularly large, one person can not do it, always delaying the construction period, so the four brothers discussed: the boss takes the order, Three brothers came to work. After more customers, the boss assigns new tasks according to a certain principle (policy) according to the workload of the three brothers. High availability cluster ( high availability cluster) The   two brothers open breakfast shops, the business is not big, but it arrives at 7 o'clock every morning There are many customers between 9 o'clock and cannot be interrupted. In order to ensure that the breakfast shop can provide continuous service within 2 hours, the two brothers discussed several methods:
 

  

  Method One: usually the boss to do business, this time at home waiting for her second child, once the boss can not do business, and the second child came out on top, this is called Active / Standby (. Hot standby )
Method Two: usually the boss to do business, this time her second child next to the workers, once the boss can not do business, the second immediately on top, this is called Active / Passive (. dual duplex )
  method three: the boss usually selling steamed buns, also selling milk next to her second child, boss has a problem, her second child on the buns and sell, and sell milk, the second child to die, and then the boss selling steamed buns, and selling milk. this is called Active / Active (dual Active) ( dual Active )
  bun = application package, Taking care of each other is called heartbeat, and taking over for each other’s work is called failover/takeover. If two brothers are suddenly blind and deaf, and don’t know if the other is working, they both think they are going to take on each other’s work. This is called brain-split, and then Need a third party, such as their father, to solve the problem, this is called tier-breaker, or let their two daughter-in-laws come over and take one of them, this is called fency. high computing clustering (high-performance computing cluster)   10 brothers together In the hand-made furniture business, a customer came to their father and asked to make a very complicated set of antique furniture, which can be done by one person, but it takes a long time to hand over this set of furniture in one week, 10 pieces The brothers decided to do it together.   Dad separates the different parts of this set of furniture to his sons, and then each son is doing wooden furniture processing, and finally put them together to order the goods.   Dad is the scheduler task scheduler, and the sons are the compute nodes. The work they do is called homework.
  




      (其实,还有一种,分布式 存储 相关的集群,应用于超大规模网站,云计算平台等等。涉及点存储方面的,这里就不介绍了)

        严格来讲,这些已经超过了一般开发人员的知识范畴了,想真正理解和掌握这些并不太容易,有时候需要真正的实践而不是闭门造车。从运维人员和系统架构师的角度来看,不仅需要具备丰富的操作系统配置和管理的经验,更要具备网络协议、存储等相关的知识(懂算法和底层的就更完美了)。从开发人员和软件架构师的角度来看,需要考虑的重点又不同了。当然,远远不止我所提到的这些。现在的Web应用一般都比较依赖于基础架构,而越来越脱离了”纯软件架构“的本质。集群不是万能的,但有时候确实相当有用。由于项目和工作关系,我本人目前主要使用的是微软的技术体系(当然,目前大都是基于windows平台的)。有机会的话,我可以将自己在这方面的研究和实践分享出来,更希望有兴趣的朋友在一块分享和交流。

Guess you like

Origin blog.csdn.net/dinglang_2009/article/details/8302258