Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of Pika architecture design for Redis storage system

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "what is the method of Redis storage system Pika architecture design?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the method of Redis storage system Pika architecture design".

Pika is an efficient, stable, simple and reliable open source NoSQL database product jointly developed by the infrastructure team and DBA team. It is fully compatible with Redis protocol and supports five data structures (string,hash,list,set,zset). Data is persisted to RocksDB. Compared with the storage mode of Redis memory, it can greatly reduce the occupation of server resources and enhance the reliability of data. It can be deployed in both stand-alone and cluster modes. The Pika project was launched in 2015 and then opened up on Github. There are now 3700 stars,35 contributors, and the community has a large number of online businesses to make Pika.

Contrast Redis

Storage capacity: Redis is stored to memory, resulting in high hardware cost and high latency for downtime recovery. When Pika borrows RocksDB to disk, a single server can hold dozens of times more data than Redis, resulting in fast recovery from downtime.

Throughput: Redis QPS is higher, QPS;Pika QPS of mega-level per server is relatively low, single server is hundreds of thousands, and Redis is 3-5 times that of Pika.

Access delay: Redis should be within 1ms; Pika delay is slightly higher, and 3ms should be within.

OPS deployment: Redis supports stand-alone master-slave deployment and cluster deployment; Pika also supports two deployment methods.

Applicable scenario

If the business scenario has a large amount of data (> 50GB) and requires high data reliability, then Pika can solve your problem.

Scenario 1: intermediate result storage of large-scale data processing system

Scenario 2: a business system that uses Redis/Redis Cluster for persistent storage

Scenario 3: metadata storage in large distributed systems

Architecture design

Pika can choose whether to run Pika in classical mode (Classic) or distributed mode (Sharding) by setting the instance-mode configuration item in the configuration file to classic and sharding.

Classical mode architecture

Classic mode (Classic): that is, 1 master N slave synchronization mode, 1 master instance stores all data, N slave instances fully mirror the data of master instance, each instance supports multiple DBs. DB starts from 0 by default, and the configuration item databases of Pika can set the maximum number of DB. The physical presence of DB on Pika is a file directory.

Distributed pattern architecture

Distributed mode (Sharding): in Sharding mode, the data set stored by users is called Table, and each Table is divided into multiple slices, and each shard is called Slot. For the data of a certain KEY, the hash algorithm determines which Slot it belongs to. Distribute all Slots and their replicas to all Pika instances according to a certain policy, and each Pika instance has part of the master Slot and part of the slave Slot. In Sharding mode, it is the Slot rather than the Pika instance that divides the master from the slave. The physical presence of Slot on Pika is a file directory.

The above is the content of this article on "what is the method of Pika architecture design of Redis storage system". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report