当前位置:网站首页>Differences and introduction of cluster, distributed and microservice

Differences and introduction of cluster, distributed and microservice

2022-07-07 05:40:00 Qin Tian

Catalog

One 、 The concept of cluster

Two 、 Why use clustering ?

1、 Characteristics of cluster

2、 Advantages of cluster

3、 Cluster classification and the characteristics of different classifications

3、 ... and 、 Cluster classification introduction

1、 Load balancing cluster

2、 High availability clusters

3、 High performance computing cluster

Four 、 The difference between cluster and distributed

1、 Distributed diagram

2、 Illustration of cluster mode

5、 ... and 、 The difference between distributed and micro Services

1、 Is distributed a micro service ?

2、 Microservice architecture


One 、 The concept of cluster

Server cluster is a kind of server system , It works through a loosely integrated set of server software and / Or the hardware is connected together to complete the computing work closely . In a sense , They can be seen as a server .

A single server in a cluster system is usually called a node , Usually connected through a local area network , But there are other possible ways to connect . Cluster servers are usually used to improve the computing speed and performance of a single server / Or reliability . In general, cluster

The server is better than a single server , For example, the performance price ratio of workstation or super server is much higher . A cluster is a group of independent servers , Through network connection, combine into a group to complete a task together .

Speak straight and white , A cluster is a set of independent servers , Through the high-speed network to form a server system , Each cluster node is a separate server running its own process . For Internet users , The back end of a website is a single system , Work together to provide system resources to users , system service .

Two 、 Why use clustering ?

1、 Characteristics of cluster

-  High performance performance

Some require a lot of computing power, such as weather forecasting , Nuclear tests, etc . It's not something a few servers can do . It takes thousands of them to complete the work .

-  Price effectiveness

Usually a system cluster architecture , Only a few or dozens of server hosts are needed , Compared with mobile, millions of dedicated super servers are more cost-effective .

-  Scalability

When the server load pressure increases , The system can be extended to meet the requirements , And it doesn't reduce the quality of service .

-  High availability

Despite some hardware and software failures , The service of the whole system must be 7*24 Running in hours .

2、 Advantages of cluster

-  transparency

If some servers are down, the business will not be affected , Generally, the coupling degree is not so high , Dependency is not that high . such as NFS If the server goes down, the rest can't be mounted , It's too dependent .

-  High performance

More visits , It's easy to expand .

-  manageability

The whole system can be physically large , But it's easy to manage .

-  Programmability

On a cluster system , Easy to develop applications , The portal will ask for this .

3、 Cluster classification and the characteristics of different classifications

Computer cluster architecture is generally divided into the following categories according to its function and structure :

-  Load balancing cluster (Load balancing clusters) abbreviation LBC

-  High availability clusters (High-availability clusters) abbreviation HAC

-  High performance computing cluster (High-perfomance clusters) abbreviation HPC

-  Grid computing (Gridcomputing)

In terms of cluster classification , There are generally three on the Internet , Load balancing and high availability cluster architecture is commonly used in our Internet industry .

3、 ... and 、 Cluster classification introduction

1、 Load balancing cluster

Load balancing cluster provides more practical for enterprises , More cost effective system architecture solutions . The load balancing cluster allocates the load pressure of requests from many customers to the computer cluster as evenly as possible .

Customer request load usually includes application level processing load and network traffic load . Such a system is ideal for serving a large number of users using the same set of applications . Each node can bear the load pressure of access request , And it can realize the dynamic allocation of access requests among nodes , To achieve load balancing .

Load balancing runtime , Generally, one or more front-end load balancers distribute client access requests to a group of servers on the back end , So as to achieve high performance and high availability of the whole system . This cluster is sometimes called a server cluster .

Generally, high availability cluster and load balancing cluster will use similar technology , Or it has the characteristics of high availability and load balancing at the same time .

The role of load balancing cluster :

a) Share access traffic ( Load balancing )

b) Maintain business continuity ( High availability )

2、 High availability clusters

Generally refers to when any node in the cluster fails , All tasks on the node are automatically transferred to other normal nodes , And this process does not affect the operation of the entire cluster , Does not affect the provision of business .

Similarly, there are two or more nodes running in the cluster , When a master node fails , So what else can we do The node of the node will take over the master node , Continue the task above . The slave node can take over the resources of the master node (IP Address , Architecture, identity, etc ), At this time, the user will not find that the service object is transferred from the master node to the slave node .

The role of high availability clusters : When one machine goes down and another takes over . More commonly used high availability cluster open source software is :keepalive,heardbeat.

3、 High performance computing cluster

High performance computing cluster adopts the method of assigning computing tasks to different computing nodes in the cluster to improve the computing power , So it is mainly used in the field of scientific computing .

More popular HPC use Linux Operating system and other free software to do parallel computing . This cluster configuration is often referred to as Beowulf colony . Such clusters usually run specific programs to play HPCcluster The ability to parallel . This type of program usually uses a specific runtime , For example, designed for scientific computing MPI library .HPC Cluster is especially suitable for computing jobs where a large amount of data communication occurs between computing nodes , For example, the intermediate result of one node or the situation that affects the calculation result of other nodes .

Four 、 The difference between cluster and distributed

Cluster is a physical form , Distributed is a way of working

  • Distributed : One business is split into several sub businesses , Each sub service is deployed on different servers
  • colony : The same business , Deployed on multiple servers

1) Distributed refers to the distribution of different sub businesses in different places . Clustering refers to clustering several servers together , Achieve the same business .

2) Every node in the distribution , Can do cluster . Clusters are not necessarily distributed .

give an example : For example, sina.com , More people visited , He can make a group , Put a response server in front , The following servers complete the same business , If there is a business visit , Response server to see which server load is not very heavy , Which one will be given to complete .

3) And distributed , Understand... In a narrow sense , It's similar to clustering , But it's more loosely organized , It's not like clustering , There is an organization , A server is down , Other servers can be on top .

4) Every distributed node , All complete different sub businesses , A node is broken , Then this business is not accessible .

In short , Distributed is to shorten the execution time of a single task to improve efficiency , Cluster is to improve the efficiency by increasing the number of tasks per unit time .

A good design should be a combination of distributed and cluster , First distributed and then clustered , The specific implementation is to split the business into many sub businesses , Then cluster deployment is carried out for each sub business , In this way, if there is a problem with each sub business , The whole system will not be affected at all .

1、 Distributed diagram

Divide a large system into multiple business modules , Business modules are deployed on different machines , Each business module interacts with each other through the interface . The way to distinguish between distributed systems is based on different machines and different services .

above :service A、B、C、D Business components , adopt API Geteway Business access .

notes : Distributed business needs to be well managed

2、 Illustration of cluster mode

 

Cluster mode is that different servers deploy the same set of services for external access , Load balancing of services . The way to distinguish clusters is based on whether the services of multiple servers deployed are the same .

notes : Cluster mode needs to be done well session share , Make sure that in the process of switching between different servers, it will not be caused by not getting session And discontinue the service .

General configuration Nginx* Implementation of load container based on XML : Static resource cache 、Session Sharing can come with ,Nginx Support 5000 Concurrency .

5、 ... and 、 The difference between distributed and micro Services

in addition , Another concept is similar to distributed computing , That's Micro service .

Microservice is an architectural style , A large complex software application consists of one or more microservices . Each microservice in the system can be deployed independently , The microservices are loosely coupled . Each microservice only focuses on accomplishing one task and accomplishing it well . In all cases , Each task represents a small business capability .

1、 Is distributed a micro service ?

Distributed must be microservices , Microservices are not necessarily distributed

The definition of distributed : Split a service into several sub Services , On different servers . Microservices can be placed on the same server , It can also be placed on different servers .

2、 Microservice architecture

Microservices are designed to avoid the upgrade and BUG Affect the existing system business . The subtle difference between microservices and distribution is , Microservice applications are not necessarily distributed on multiple servers , It can also be the same server .

 

 

原网站

版权声明
本文为[Qin Tian]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207062341085238.html