Redis 是一个高性能的 key-value 数据库，作为一个典型的内存数据库，高速读写性能并支持数据持久化是大多数人选择 Redis 的原因，当然 Redis 也有很多局限，即使现在升级至 5.0 在技术圈仍有很多不同的声音。Redis 监控可以通过 Keepalived 结合简单的脚本实现，也可以基于 Redis Sentinel 监控，如果需要横向扩展使用 Codis 或许是更加成熟稳定的方案。
Redis - https://redis.io/
Redis is often referred as a data structures server. What this means is that Redis provides access to mutable data structures via a set of commands, which are sent using a server-client model with TCP sockets and a simple protocol. So different processes can query and modify the same data structures in a shared way.
Data structures implemented into Redis have a few special properties:
- Redis cares to store them on disk, even if they are always served and modified into the server memory. This means that Redis is fast, but that is also non-volatile.
- Implementation of data structures stress on memory efficiency, so data structures inside Redis will likely use less memory compared to the same data structure modeled using an high level programming language.
- Redis offers a number of features that are natural to find in a database, like replication, tunable levels of durability, cluster, high availability.
Another good example is to think of Redis as a more complex version of memcached, where the operations are not just SETs and GETs, but operations to work with complex data types like Lists, Sets, ordered data structures, and so forth.
If you want to know more, this is a list of selected starting points:
- Introduction to Redis data types. http://redis.io/topics/data-types-intro
- Try Redis directly inside your browser. http://try.redis.io
- The full list of Redis commands. http://redis.io/commands
- There is much more inside the Redis official documentation. http://redis.io/documentation
Latest stable version tar ball
Browse source code
# create directory
最简单的模式只需要修改 daemonize yes，然后备机使用 slaveof 命令设置即可
# Redis 默认配置
使用 keepalived 做最基本的高可用
[root@sg-gop-10-71-12-78 redis-6389]# cat start_redis.sh