Joke Collection Website - Blessing messages - What do you mean by limited service?

What do you mean by limited service?

Interception of requests beyond the service processing capacity and restriction of traffic accessing the service are called service flow restriction.

Common current limiting methods can be divided into two categories: request-based current limiting and resource-based current limiting. The first is to limit the total amount, that is, to limit the cumulative upper limit of an indicator. Usually limit the total number of users currently served by the system. For example, the maximum number of users in a live broadcast room is 6.5438+0 million, and new users cannot enter after exceeding 6.5438+0 million; There are only 100 products in a snapping activity, and the upper limit of users participating in snapping is 10000. After 10000, users directly refused.

The second is to limit the amount of time, that is, to limit the upper limit of an indicator for a period of time. For example, only 65,438+00,000 users are allowed to access within 65,438+0 minutes, and the maximum number of requests per second is 65,438+million.

Five current limiting strategies

1 denial of service

When the requested traffic reaches the current limit threshold, redundant requests can be directly rejected, and requests from different sources such as designated domain names, IP, clients, applications and users can be rejected by design.

2. Delayed processing

By adding redundant requests to the cache queue or delay queue, we can handle the sudden increase in traffic in a short period of time and gradually handle the accumulated request traffic after the peak period.

3. Request classification (priority)

Set priorities for requests from different sources, and handle higher-priority requests first. For example, VIP customers and important business applications (such as transaction services have higher priority than log services).

4. Dynamic current limiting

It can monitor system-related indicators, evaluate system pressure, and dynamically adjust the current limit threshold through the registration center and configuration center.

5. Monitoring, early warning and dynamic expansion

If there is an excellent service monitoring system and an automatic deployment and release system, the monitoring system can automatically monitor the operation of the system, and give an early warning of the sudden increase in service pressure and a large amount of traffic in a short period of time through e-mail, SMS and other means. Under certain conditions, related services can be automatically deployed and published, which has the effect of dynamic expansion.