Clustering, distributed, microservices concepts and differentiated understanding

Source: Internet
Author: User
Tags split
Concept:

A cluster is a physical form, and distributed is a way of working. distributed: One business splits multiple sub-businesses, deployed on different servers cluster: One business, deployed on multiple servers

1: distributed refers to the distribution of different businesses in different places. Clustering, however, refers to centralizing several servers together to achieve the same business.

Each node in the distribution can be a cluster. Clusters are not necessarily distributed.

Example: For example, Sina, the number of people who visit, he can do a cluster, the front of a response server, the next few servers to complete the same business, if there is business access, the response server to see which server load is not very heavy, will be to which to complete.

and distributed, from the narrow meaning of understanding, but also similar to the cluster, but its organization is relatively loose, unlike clustering, there is an organizational, a server collapsed, the other servers can be top up.

distributed to each node, all of the different business, a node collapsed, then the business is inaccessible.

2: To put it simply, distributed is to improve efficiency by shortening the execution time of a single task, while clustering increases efficiency by increasing the number of tasks executed per unit of time.

For example, if a task consists of 10 subtasks, each of which takes 1 hours to execute separately, it takes 10 hours to perform the task on a single server.

The distributed scheme provides 10 servers, each server is responsible for only one sub-task, regardless of the dependencies between subtasks, it takes one hours to complete this task. (A typical representation of this mode of operation is the Map/reduce distributed computing model of Hadoop)

The use of cluster scheme, also provides 10 servers, each server can handle this task independently. Assuming 10 tasks arrive at the same time, 10 servers will work at the same time, and after 1 hours, 10 tasks are completed at the same time, so that the entire body, or 1 hours to complete a task.

Good design should be distributed and cluster integration, first distributed re-cluster, the specific implementation is the business split into a lot of sub-business, and then for each sub-business cluster deployment, so that each sub-business if the problem, the entire system will not be affected.

In addition, there is a concept similar to the distribution, that is, microservices.

microservices are an architectural style, and a large, complex software application consists of one or more microservices. Each micro-service in the system can be deployed independently, and the various microservices are loosely coupled. Each microservices is focused on completing a task and doing it well. In all cases, each task represents a small business capability.


difference:

1. Distributed


A large system is divided into several business modules, and the business modules are deployed to different machines, and each business module interacts with the data through the interface. The difference between distributed methods is based on different machines and different businesses.

above: Service A, B, C, D are business components, business access through API Geteway, respectively.

Note: Distributed needs to do transaction management.

Distributed transactions can be consulted: Distributed transaction solutions for MicroServices architectures

2. Cluster mode


Cluster mode is the deployment of different servers to the same set of services to external access, to achieve load balancing services. The way to differentiate clusters is based on whether the deployment of multiple server services is the same.

Note: The cluster mode needs to do a good session sharing, to ensure that the process of switching between different servers will not abort the service because the session is not obtained.

General configuration nginx* Load container implementation: The static resource cache, session sharing can be implemented, NGINX support 5,000 concurrent volume. 3. Whether the distribution belongs to MicroServices.

the answer is yes. MicroServices mean that the module is split into a separate service unit through the interface to achieve data interaction. 4. Micro-Service Architecture

MicroServices are designed to not affect existing system operations because of upgrades and bugs in one module. The small difference between microservices and distribution is that microservices are not necessarily distributed across multiple servers, but can also be the same server.


Distributed and tiny architectures are similar, but they are not deployed in the same way.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.