Design and implementation of high-performance and high-availability redis client

Redis is an unstructured database based on memory storage. It is known for high I/O(Input/Output) performance and high response speed. It plays an important role in data buffering, message queues, key-value storage and other scenarios. Among the many clients it supports, the C/C++ client Hiredis is...

Full description

Saved in:
Bibliographic Details
Main Authors: Liu Shichao, Yang Bin, Liu Weiguo
Format: Article
Language:zho
Published: National Computer System Engineering Research Institute of China 2022-01-01
Series:Dianzi Jishu Yingyong
Subjects:
Online Access:http://www.chinaaet.com/article/3000145076
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Redis is an unstructured database based on memory storage. It is known for high I/O(Input/Output) performance and high response speed. It plays an important role in data buffering, message queues, key-value storage and other scenarios. Among the many clients it supports, the C/C++ client Hiredis is particularly widely used. This article did an in-depth analysis of the Hiredis library and found that its pipeline function has high overhead, improper instruction storage, and memory confusion problems. Based on this, this article designs and implements a C/C++-oriented high-performance and high-availability Redis client on a 32-core X86 architecture processor and a 64 GB memory Linux server. It improves the performance of processing a large number of instructions and solves the problem of memory confusion in complex scenarios through memory pre-allocation and memory isolation. After testing, the new client has improved instruction execution efficiency by 3~7 times, while also ensuring memory safety and accuracy in complex scenarios.
ISSN:0258-7998