Current location - Quotes Website - Personality signature - How does ASP prevent duplicate requests? NETWebApi service interface?
How does ASP prevent duplicate requests? NETWebApi service interface?
For large websites, distributed and load balancing technologies will be used, but generally small websites will not involve these technologies, so many students in small and medium-sized technology companies may not be very clear about these two concepts.

What is a distributed system?

Distributed system is relative to centralized system, and most small and medium-sized applications are centralized systems, that is, all the lazy things that the whole project depends on are in one application, with high coupling. Distributed system is to split the centralized application according to business, function and module, and deploy it on servers of different nodes, so as to avoid single-node failure and improve the availability of the system.

Generally speaking, distribution means that the same task is handed over to different servers, or different tasks are handed over to different servers. If the tasks are the same, this distributed deployment can also be called "cluster".

What is load balancing?

Load balancing is actually to distribute users' requests to different servers through specific algorithms (such as polling, randomization, IPHash, URLHash, etc.). ), and what load balancing actually does is task scheduling and forwarding.

Implementation scheme of load balancing technology

There are many ways to achieve load balancing, and the most common ones are:

1, IP load balancing

Load balancing based on TCP/IP technology can be realized by hardware or software. The hardware is mainly F5, and there are many softwares, such as Nginx, HAProxy, LVS, etc.

2.DNS polling

Now some intelligent DNS resolution platforms can easily achieve load balancing. We distribute requests to different servers by configuring multiple DNSA records. However, DNS polling has a fatal disadvantage: it lacks a timely health check mechanism and exposes the real IP with security risks.

3、CDN

CDN content distribution network is actually a way to achieve load balancing, and the node servers of CDN distributed all over the country are actually distributed.