Clusters, distributed, and the difference between the concept of micro-services

concept:

A cluster is a physical form, is a distributed work.

  • Distributed: a plurality of sub-service business split into each sub-services are deployed on different servers
  • Cluster: the same service, deployed on multiple servers

 

1, distributed refers to the different sub-distribution business in different places. The cluster refers to the focus on a few servers together to achieve the same business.

Distributed in each node, the cluster can be done. The cluster is not necessarily distributed.

For example: it is such as Sina, people visit more, he can do a cluster, put in front of a response from the server, followed by a few servers to complete the same service, if the service access when the server response Behold server load is not very heavy, it will Which to complete.

And distributed, understood in a narrow meaning, but also with similar cluster, but its organization is relatively loose, unlike clusters, there is a resistance organization, a server broke down, the other server can be on top.

Each node in a distributed, completed different sub-business, collapse a node, then the business will not be visited.

 

2, simply, is distributed shorter execution times of individual tasks to improve efficiency, while the cluster is to improve efficiency by increasing the number of tasks performed per unit time.

For example: if a sub-task by the 10 tasks, each sub-task is to execute a single one hour, is required to perform the task for 10 hours on a single server.

A distributed program to provide 10 servers, each server only handles one sub-task, 1 hour to complete a service. (A typical representative of this mode of operation is the Hadoop Map / Reduce distributed computing model)

The use of cluster solutions, also provides 10 servers, each server can independently handle this task. Suppose there are 10 tasks simultaneously reach, 10 servers will work simultaneously, 10 hours to complete the 10 service.

 


 

Good design should be a combination of distributed and clustered, distributed and then the first cluster, the specific implementation is split into many sub-services business, then each sub-cluster deployment for business, so that each child business if things go wrong, the whole system is fully will not be affected.

In addition, there is a concept and distributed quite similar, and that is micro-services.

Micro Services is an architectural style, a large and complex software applications by one or more micro-service. Each micro service system may be independently deployed between the respective micro-services are loosely coupled. Each micro serve only to focus on and complete a task well done the task. In all cases, each task represents a small operational capacity.

 

 

the difference:

 

1. Distributed

The system is divided into a large plurality of service modules, each service module deployed on different machines, the interaction between the various data traffic through the interface module. The difference between a distributed manner is different depending on the machine business.

Above: service A, B, C, D are the assembly operations carried out by the service access API Geteway.

Note: Distributed transaction management needs to do a good job.

Distributed Transaction may refer to: micro Services Architecture Distributed Transaction Solutions

2. cluster model

Cluster model is different servers deployed outside access to the same set of services, load balancing services. Way difference is whether the same cluster based on the deployment of multiple server business.

Note: Cluster-Mode need to do session sharing to ensure that does not get to because there is no session was aborted out of service during the different servers handover.

Nginx * general configuration of the load container implementation: static resource cache, Session sharing can be achieved incidental, Nginx support 5000 concurrent amount.

3. whether micro-distributed service?

Services must be distributed micro, micro-services are not necessarily distributed.

Distributed definition: a service to split into a plurality of sub-services, on separate servers. Micro service can be placed on the same server or on a different server.

4. Micro Services Architecture

Design of micro-services in order not to affect the upgrade because of a BUG modules and existing systems business. Micro Services and Distributed nuances that the application of micro-services is not necessarily spread across multiple servers, he may also be the same server.

 

Distributed incognito and the architecture is very similar, but the way to deploy just not the same.

Guess you like

Origin www.cnblogs.com/zkteam/p/12121860.html