Font Size: a A A

Design And Implementation Of Structured Data Cache System Based On Redis

Posted on:2017-01-29Degree:MasterType:Thesis
Country:ChinaCandidate:J P WangFull Text:PDF
GTID:2348330503989795Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the constant expansion of the data scale and the sharp increase in the number of users, the pressure faced by the traditional structured databases builds up. Improving the read and write performance of structured databases i.e. MySQL has become an urgent problem to be solved. Redis database puts all the data in memory for management and greatly improves the data access performance. It is very suitable for data cache management. The design of the cache strategy for structured data in Redis to reduce the structured database pressure and improve the read and write performance is of great theoretical significance and practical value.On the basis of conducting in-depth analysis to the data characteristics of structured data and the access process, we used structured database and proxy server architecture, deployed Redis memory database on the proxy server, and designed and implemented a cache system for structured data on Redis. As the condition that part of the query result set is too large, this system designed a prefix caching method based on the user's query frequency, read and write ratio, and so on. In the cache block, only the portion of the data is cached. When the user's actual demand increases, the system extends cache block and supplements the needed data. While the user's actual demand reduces, this system only sets updating flag, putting the space compression operation at the time when it is out of memory. This method not only can better meets the need of users, but also can release a lot of memory space which reduces the probability of cache replacement. when there is insufficient cache space, for the query result set type, the system proposed an adaptive caching replacement algorithm, which improves the Hybrid replacement algorithm and combines with LFU replacement algorithm. Based on the user's actual query needs, this paper made full use read and write performance of Redis memory database, and more efficiently used memory space, thus improving the performance of the cache system.Through experiments to test each function module of the cache system the results show that, the system increases the number of cache blocks by prefix caching strategy and cache block compression scheme, which improves the cache hit rate and byte hit rate, and has a certain application value.
Keywords/Search Tags:Structured data, cache, replacement algorithm, cache hit rate
PDF Full Text Request
Related items