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!
_version_ 1849425639913816064
author Liu Shichao
Yang Bin
Liu Weiguo
author_facet Liu Shichao
Yang Bin
Liu Weiguo
author_sort Liu Shichao
collection DOAJ
description 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.
format Article
id doaj-art-e15214b2d5714159a20fd36a1e34a310
institution Kabale University
issn 0258-7998
language zho
publishDate 2022-01-01
publisher National Computer System Engineering Research Institute of China
record_format Article
series Dianzi Jishu Yingyong
spelling doaj-art-e15214b2d5714159a20fd36a1e34a3102025-08-20T03:29:43ZzhoNational Computer System Engineering Research Institute of ChinaDianzi Jishu Yingyong0258-79982022-01-01481465210.16157/j.issn.0258-7998.2124323000145076Design and implementation of high-performance and high-availability redis clientLiu Shichao0Yang Bin1Liu Weiguo2School of Software,Shandong University,Jinan 250101,ChinaSchool of Software,Shandong University,Jinan 250101,ChinaSchool of Software,Shandong University,Jinan 250101,ChinaRedis 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.http://www.chinaaet.com/article/3000145076redispipelinehiredismemory confusionperformance optimization
spellingShingle Liu Shichao
Yang Bin
Liu Weiguo
Design and implementation of high-performance and high-availability redis client
Dianzi Jishu Yingyong
redis
pipeline
hiredis
memory confusion
performance optimization
title Design and implementation of high-performance and high-availability redis client
title_full Design and implementation of high-performance and high-availability redis client
title_fullStr Design and implementation of high-performance and high-availability redis client
title_full_unstemmed Design and implementation of high-performance and high-availability redis client
title_short Design and implementation of high-performance and high-availability redis client
title_sort design and implementation of high performance and high availability redis client
topic redis
pipeline
hiredis
memory confusion
performance optimization
url http://www.chinaaet.com/article/3000145076
work_keys_str_mv AT liushichao designandimplementationofhighperformanceandhighavailabilityredisclient
AT yangbin designandimplementationofhighperformanceandhighavailabilityredisclient
AT liuweiguo designandimplementationofhighperformanceandhighavailabilityredisclient