一个计算机技术爱好者与学习者

0%

LDAP简介

The LDAP(Lightweight Directory Access Protocol) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. Directory services play an important role in developing intranet and Internet applications by allowing the sharing of information about users, systems, networks, services, and applications throughout the network. As examples, directory services may provide any organized set of records, often with a hierarchical structure, such as a corporate email directory. Similarly, a telephone directory is a list of subscribers with an address and a phone number.

简单来说,LDAP(轻量目录访问协议)是一个协议,用来解决多个系统的统一权限管理问题。

参考文档:

阅读全文 »

Redis集群模式简介

Redis集群是Redis的一种高可用解决方案,它通过在多个节点上分片存储数据,实现数据的高可用和扩展。Redis集群最初是在Redis 3.0版本中引入的。

Redis集群的节点由多个主节点和从节点组成,每个主节点都有多个从节点。集群中的每个节点都维护了整个集群的状态信息,节点之间通过Gossip协议进行通信,通过相互交换状态信息来保持集群中节点的一致性。Redis集群使用的哈希槽(hash slot)将键映射到不同的节点,实现了数据的分布式存储。

Redis集群的优点包括:

  • 高可用:当集群中的某个节点故障时,集群仍然可以正常运行。
  • 扩展性:Redis集群可以支持更多的数据和客户端请求,可以通过增加节点来实现横向扩展。
  • 分布式:Redis集群可以将数据分散在不同的节点上,使得数据的读写负载得到了平衡,提高了Redis的性能。

但是Redis集群也存在一些限制和注意事项,例如:

  • Redis集群只能支持单个数据库空间,不能在不同节点之间存储不同的数据库。
  • Redis集群不支持事务嵌套和 Lua 脚本中的事务操作。
  • Redis集群使用的是哈希槽分片,因此在集群运行过程中,不能动态添加或删除哈希槽,否则会导致数据的迁移,对集群性能产生影响。

在实际应用中,如果需要使用Redis集群,需要对集群中的节点进行适当的配置和调优,以确保集群的高可用性、性能和可靠性。

本节内容来自ChatGPT。

阅读全文 »

Redis简介

Redis: The open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker.

Redis是被数百万开发人员用作数据库、缓存、流引擎和消息代理的开源内存数据存储。

Redis特点:

  • Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载进行使用。
  • Redis不仅仅支持简单的key-value类型的数据,同时还提供list,set,zset,hash等数据结构的存储。
  • Redis支持数据的备份,即master-slave模式的数据备份。

Redis优势:

  • 性能极高 – Redis能读的速度是110000次/s,写的速度是81000次/s 。
  • 丰富的数据类型 – Redis支持二进制案例的 Strings, Lists, Hashes, Sets 及 Ordered Sets 数据类型操作。
  • 原子 – Redis的所有操作都是原子性的,意思就是要么成功执行要么失败完全不执行。单个操作是原子性的。多个操作也支持事务,即原子性,通过MULTI和EXEC指令包起来。
  • 丰富的特性 – Redis还支持 publish/subscribe, 通知, key 过期等等特性。

参考文档:

阅读全文 »