Redis data expiration processing method and apparatus
A data and processor technology, applied in the Internet field, can solve the problems of redis performance impact, performance degradation, redis performance degradation, etc., and achieve the effect of improving concurrent performance, reducing performance impact, redis performance and optimization
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0040] Based on the existing ttl mechanism, the present invention proposes an alternative solution, reduces the dependence of redis on the original ttl mechanism, and optimizes redis performance and memory usage.
[0041] ttl (Time To Live, time to live), which is set by the sending host, this field specifies the maximum number of network segments allowed to pass before the IP packet is discarded by the router, so as to prevent the data packet from continuously looping endlessly on the IP Internet. When the time set by the ttl of a certain key is up, the key will be invalidated, that is, deleted.
[0042] Redis is an open-source log-type, Key-Value database written in ANSI C language, supporting network, memory-based and persistent, and provides APIs in multiple languages. It uses the redis- trib.rb can complete the operation of creating a cluster. redis-trib.rb is a Redis cluster management program developed using ruby. It can create clusters, check the online status of clust...
Embodiment 2
[0056] This embodiment is similar to Embodiment 1, except that in this embodiment, in step S3, the deletion operation is performed according to the priority of each deletion operation request based on the priority scheduling algorithm.
[0057] The priority scheduling algorithm refers to:
[0058] 1. When the algorithm is used for job scheduling, the system selects several jobs with the highest priority from the background job queue, and the jobs that the system can meet the resource requirements are loaded into the memory to run;
[0059] 2. When the algorithm is used for process scheduling, the processor will be assigned to the process with the highest priority in the ready queue.
[0060] The prior art method is used in the priority scheduling algorithm, which will not be described in detail here.
[0061] Specifically, the priority arrangement of each deletion operation request includes:
[0062] Each delete operation request is prioritized according to the data of diffe...
Embodiment 3
[0066] A device for redis data expiration processing based on the redis data expiration processing method of embodiment one or embodiment two, including a processor 1, and the processor 1 includes a listening module 11 and a deletion operation request module 12 connected to each other in sequence , query module 13 and deletion module 14, wherein,
[0067] Monitoring module 11, used for performing monitoring service to etcd;
[0068] A delete operation request module 12, configured to initiate a delete operation request to redis when the monitoring module detects that at least one key triggers an expiration event;
[0069] Query module 13, for querying the redis node where the key triggering the expiration event is located;
[0070] The delete module 14 is configured to perform a delete operation on the key that triggers the expiration event.
[0071] Further, the processor 1 also includes a registration module 15, and the registration module 15 is configured to register the ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com