DNS Cache Read-Write Lock Segmentation for Concurrency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing DNS cache management systems face issues with thread wait and reduced response speed due to mutual influence between different cache information operations, lack of smart update strategies, and low cache quality, especially during frequent updates.

Innovation Solution

A method and system for processing DNS cache information that uses read and write lock information to isolate cache operations, allowing for concurrent reading and writing without affecting other cache information, and implements proactive cache update strategies based on domain name classification and time-to-live (TTL) values.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a read-write lock is used to manage DNS cache operations, then cache information can be protected from concurrent access conflicts, but read operations are blocked during write operations causing thread wait and reduced response speed

Engineering Contradiction:
Improvecache operation safetyVSAvoidthread wait time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the lock mechanism by creating separate read locks and write locks that can operate independently. Multiple read operations can acquire read locks simultaneously without blocking each other, while write operations acquire write locks that prevent both reads and writes during the update process. This segmentation allows concurrent read operations to proceed without waiting for write operations to complete, resolving the contradiction between cache operation safety and thread wait time.

Inventive Principle:
Principle #1Segmentation

2Stability of the object's composition

If a global lock is used to protect the entire cache, then data consistency is maintained, but all cache operations (both read and write) are blocked mutually causing long delays

Engineering Contradiction:
Improvecache data consistencyVSAvoidcache operation throughput
Core Design Contradiction:
Stability of the object's compositionVSProductivity

Solution Approach 1:

The patent divides the global cache into multiple independent data structures, each with its own lock mechanism. This segmentation allows operations on different cache entries to proceed concurrently without mutual blocking. For example, a read operation on one cache entry and a write operation on another cache entry can occur simultaneously, maintaining data consistency within each entry while significantly improving overall cache operation throughput.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies locks at the local level of individual cache data structures rather than globally across the entire cache. Each data structure has its own read-write lock that only affects operations on that specific structure. This local locking approach maintains data consistency for each cache entry while allowing parallel operations on different entries, thereby improving productivity without sacrificing stability.

Inventive Principle:
Principle #3Local quality

3Reliability

If cache update operations are performed frequently to maintain freshness, then cache quality improves, but multiple concurrent update operations cause conflicts and reduce system performance

Engineering Contradiction:
Improvecache information qualityVSAvoidupdate operation coordination
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the update operation coordination by providing separate write locks for different cache data structures. This allows multiple update operations to proceed concurrently on different cache entries without conflicting with each other. The segmentation eliminates the need for complex global coordination mechanisms, reducing device complexity while maintaining high cache information quality through frequent, parallel updates.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9930005B2Method, device and system for processing DNS cache information
Publication Date: 2018.03.27 BEIJING QIHOOD TECHNOLOGY CO LTD
  • US9930005B2 patent drawing
  • US9930005B2 patent drawing
  • US9930005B2 patent drawing

AI summary

Provided are a DNS cache information processing method, device and system. The method comprises: upon reception of a client request, resolving and obtaining domain name information requested by the client; querying in a database a data structure corresponding to the domain name information; when finding the data structure, acquiring read lock information corresponding to the data structure, the read lock information being permission information allowing performing a read operation of the cache information stored in the data structure; reading the cache information in the data structure by using the permission of the read lock information, and transmitting the read cache information to a sender requested by the client. The embodiment of the present invention can improve caching speed and cache information throughput, improving the flexibility of cache information, and enhancing the quality of stored information.