In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the reasons for the high performance of redis, the article introduces in great detail, has a certain reference value, interested friends must read it!
(1) redis is a non-relational in-memory database data stored in memory, memory reading speed is very fast, if it is only a simple key-value, memory is not the bottleneck. In general, hash lookups can reach the order of magnitude of millions per second.
(2) single thread is adopted to avoid unnecessary context switching and competition conditions.
(3) the internal implementation adopts epoll and adopts the simple event framework implemented by epoll+ itself. Read, write, close, and connect in epoll are all converted into events, and then take advantage of the multiplexing feature of epoll to never waste any time on io.
Extended reading
Redis is an open source API that is written in ANSI C language, supports the network, can be memory-based and persistent, and provides API in multiple languages. Since March 15, 2010, the development of Redis has been presided over by VMware. Since May 2013, the development of Redis has been sponsored by Pivotal.
Redis is a key-value storage system. Similar to Memcached, it supports relatively more value types, including string (string), list (linked list), set (collection), zset (sorted set-ordered collection), and hash (hash type). These data types support push/pop, add/remove, and take intersection union and difference sets, and richer operations, and these operations are atomic. On this basis, redis supports a variety of different sorting methods. Like memcached, data is cached in memory for efficiency. The difference is that redis will periodically write updated data to disk or modify operations to additional record files, and on this basis to achieve master-slave (master-slave) synchronization.
Redis is a high-performance key-value database. The emergence of redis makes up for the deficiency of key/value storage such as memcached to a great extent, and can play a good complementary role to relational database in partial situations. It provides clients such as Java,C/C++,C#,PHP,JavaScript,Perl,Object-C,Python,Ruby,Erlang, which is easy to use.
Redis supports master-slave synchronization. Data can be synchronized from the master server to any number of slave servers, which can be the master server associated with other slave servers. This makes it possible for Redis to perform single-layer tree replication. Save the disk can intentionally or unintentionally write to the data. Because the publish / subscribe mechanism is fully implemented, when the slave database synchronizes the tree anywhere, it can subscribe to a channel and receive the complete message release record of the master server. Synchronization is helpful for scalability and data redundancy of read operations.
The official website address of redis, very easy to remember, is redis.io. (specially checked, the domain name suffix io belongs to the national domain name, is british Indian Ocean territory, that is, the British Indian Ocean Territory.)
Currently, Vmware is funding the development and maintenance of redis projects.
The above are all the reasons for the high performance of redis, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.