Redis4: Data Structure

Source: Internet
Author: User
Http://www.searchtb.com/2011/05/redis-storage.html1 redis memory storage structure

This article is based on the Redis-v2.2.4 version for analysis.

1.1 overall redis memory storage structure

Redis supports multiple key-value databases (tables) and uses redisdb to represent a key-value database (table ). redisserver has a redisdb * dB; member variable. During redisserver initialization, A redisdb array is created based on the number of DB in the configuration file. after the client connects, select a reidsdb using the SELECT command. If this parameter is not specified, the default value is redisdb. after a client selects redisdb, subsequent operations are performed on this redisdb. the memory structure of redisdb is described in detail below.

Redis memory storage structure

Redisdb definition:

12345678910111213141516171819 Typedef Struct Redisdb{Dict * dict;/* The keyspace for this dB */

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.