techleader.pro
Some initial thoughts on Redis
The inverse of this is that Redis becomes a major single point of failure, making reliability especially important. After doing some research into deployment architectures for Redis, it appears that it only supports master-slave replication, with a single master handling writes and X number of read-only slaves. Replication happens over a TCP/IP port, while password authentication can be enabled between the nodes to increase security. There is a clustering solution in development, but it is not production ready 2. There are a number of issues with the current Redis master-slave architecture: "There are several problems that surface when a slave attempts to synchronize off a master that manages a large dataset (about 25GB or more). Firstly, the master server may require a lot of RAM, even up to 3X the size of the database, during the snapshotting. Although also true for small databases, this requirement becomes harder to fulfill the bigger the database grows. Secondly, the bigger the dataset is, the longer and harder it is to fork another process for snapshotting purposes, which directly affects the main server process. This phenomenon is called "latency due to fork" and is explained here and at redis.io." … 4 Naturally you would only want to run Redis on a private network. Within that network however, I have many different projects and developers using that same resource, and sadly Redis provides no authentication system beyond a single global password from which to tell them apart. 5 A single rogue client issuing a *flushall* command for example would wipe out the databases of all users of the service, not cool. My thoughts on this presently is that I will have to build an authentication system in front of Redis myself as part of my public API. … session.save_handler = redis session.save_path = tcp://127.0.0.1:6379 Finally, we have long term storage. For me this is the problem child of the bunch, as I do not think that the replication model in Redis will support very large data sets. I know that replication lag will increase with larger data sets, as will the overhead of carrying out the replication. Until the clustered solution becomes production ready, I am not ready to use Redis as a full replacement for MySQL just yet.
Related Pain Points3件
Single point of failure in master-slave replication architecture
8Redis master-slave replication has only one master handling writes, creating a critical single point of failure. The clustering solution needed for redundancy was not production-ready at the time of these reports.
Lack of built-in security features requires manual implementation
8Redis lacks robust security features out of the box and is accessible to anyone who can connect by default. Developers must manually implement firewalls, ACLs, SSL/TLS encryption, and other security measures.
Large databases on single Redis shard cause slow failover and recovery
7Running large datasets (>25GB or 25K ops/sec per shard) on a single Redis instance means failover, backup, and recovery all take significantly longer. If the instance fails, the entire dataset blast radius and recovery time are unacceptable for production systems.