Supercharge Your Innovation With Domain-Expert AI Agents!

Load balancing method based on redis cache, and server

A load balancing and server technology, applied in the computer field, can solve the problems of high time cost, large resource and labor cost, and achieve the effect of reducing time cost

Pending Publication Date: 2020-12-11
北京首汽智行科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The current load balancing method mainly assigns tasks by developing or deploying a third-party task management platform, which requires a lot of resources and labor costs. When there is a problem with the execution of a task, it is necessary to find someone who maintains the third-party task management platform to troubleshoot. Time higher cost

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The present invention will be specifically introduced below in conjunction with specific embodiments.

[0024] The embodiment of the present invention provides a load balancing method based on redis cache, the method comprising the following steps:

[0025] S101, periodically acquire service request data from the task pool.

[0026] S102, periodically acquire server data from the registration center and delete expired server data.

[0027] Among them, the server data encapsulates multiple services of this framework, and the name of each service will be regularly registered in the Redis cache for storage after the server is started.

[0028] S103. Perform a modulo calculation on the number of tasks in the service request data and the number of servers in the server data.

[0029] S104, assign each task in the service request data to a corresponding server according to the result of the modulo operation.

[0030] Optionally, assigning each task in the service request d...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a load balancing method based on redis cache, which relates to the technical field of computers, and comprises the following steps of: periodically acquiring service request data from a task pool, periodically acquiring server data from a registration center and deleting expired server data; according to the method, performing modular arithmetic on the number of the tasks in the service request data and the number of the servers in the server data, and allocating each task in the service request data to the corresponding server according to the modular arithmetic result, so that each task in the service request data can be allocated in a balanced manner, resources and labor cost are saved. And when a task execution problem occurs, the task execution problem can be solved by personnel in the unit, so that the time cost is reduced.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a redis cache-based load balancing method and server. Background technique [0002] The current load balancing method mainly assigns tasks by developing or deploying a third-party task management platform, which requires a lot of resources and labor costs. When there is a problem with the execution of a task, it is necessary to find someone who maintains the third-party task management platform to troubleshoot. Time higher cost. Contents of the invention [0003] In order to solve the deficiencies of the prior art, the embodiment of the present invention provides a redis cache-based load balancing method and server. [0004] In the first aspect, the load balancing method based on redis cache provided by the embodiment of the present invention includes the following steps: [0005] Obtain service request data from the task pool at regular intervals; [0006] Regularly obtai...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50
CPCG06F9/505
Inventor 董凯
Owner 北京首汽智行科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More