redis_cluster-防火墙操作最佳实践【转】

摘要:
Redis_cluster环境:但在Redis_集群中,必须打开两个Redis端口。配置文件中指定了一个端口。
单实例环境:
  • redis在做防火墙配置时,只需要打开对应的防火墙端口即可。如配置文件中port指定为6379,那就只要开一个6379.指定6380那就仅仅开个6380即可。
Redis_cluster环境:
  • 但在redis_cluster集群中,redis的端口必须开二个,一个是配置文件中port所指定的。另一个则必须在port指定端口中加10000整数后得出。如配置文件中port指定了6379,则在集群环境中必须开设出16379端口用于通信
不开放高位端口会造成的影响:
  • 在用rdis-trib.rb create 做集群初始配置时,当在确认完集群分配后,等待redis cluster 加入时,一直在等
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster 
aiting for the cluster to join..............................................................

官方给的解释如下:

Redis Cluster TCP ports

Every Redis Cluster node requires two TCP connections open. The normal Redis TCP port used to serve clients, for example 6379, plus the >port obtained by adding 10000 to the data port, so 16379 in the example.

This second high port is used for the Cluster bus, that is a node-to-node communication channel using a binary protocol. The Cluster bus >is used by nodes for failure detection, configuration update, failover authorization and so forth. Clients should never try to communicate >with the cluster bus port, but always with the normal Redis command port, however make sure you open both ports in your firewall, >otherwise Redis cluster nodes will be not able to communicate.

The command port and cluster bus port offset is fixed and is always 10000.

Note that for a Redis Cluster to work properly you need, for each node:

The normal client communication port (usually 6379) used to communicate with clients to be open to all the clients that need to reach the cluster, plus all the other cluster nodes (that use the client port for keys migrations).
The cluster bus port (the client port + 10000) must be reachable from all the other cluster nodes.

If you don't open both TCP ports, your cluster will not work as expected.

The cluster bus uses a different, binary protocol, for node to node data exchange, which is more suited to exchange information between >nodes using little bandwidth and processing time.

 
 


转自
作者:uglybob
链接:https://www.jianshu.com/p/fd07229569a7
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

免责声明:文章转载自《redis_cluster-防火墙操作最佳实践【转】》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇ios UIImagemodule ‘pip‘ has no attribute ‘pep425tags‘的解决方案下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

随便看看

Mock 基本使用

特殊的格式,例如IP,随机数,图片,地址,需要去收集二、mock优点1、前后端分离让前端工程师独立于后端进行开发。表示需要拦截的Ajax请求类型。表示数据模板,可以是对象或字符串。表示用于生成响应数据的函数。...

Jenkins配置git进行构建失败:Error cloning remote repo 'origin'的解决思路

出现如下的错误:Errorcloningremoterepo'origin'解决思路:1、第一时间发现应该是权限问题,那么可以切换成git协议或者https的协议去获取。...

fullcalendar日历控件知识点集合

除非对于极少的特殊需求,fullcalendar向我们提供的接口不足以满足,才会去改动fullcalendar本身的js文件。这些会议安排一般是保存在server的,在每次页面载入时,fullcalendar得到会议安排的集合,然后依照当中的日期去把事件描绘到日历相应的地方。...

产品人必备干货:产品开发流程(完整版)

以后的产品开发流程也可以参考此文档的环节进行开发。产品经理根据设计人员提供的要求需要提供以下内容:功能类:功能流程图、产品的功能点、主要功能卖点。每一个icon的设计要跟整体页面的风格保持一致,这样才能保证所有页面设计完成以后风格是保持统一的。...

html2canvas踩坑日记

在html2canvas<html2canvas(document.querySelector(“#capture”)).then(canvas=>{document.body.appendChild(canvas)});//图片地址是文档。身体appendChild(画布);...

Cesium深入浅出之视频投影【转】

通常,我们使用矩形,因为视频形状是方形的。据怀疑,视频标签隐藏了这段关系。如果再次显示,视频将再次移动。此处使用VideoSynchronizer。它可以使视频元素与铯的模拟时钟同步。让我们看看它的构造函数:name type description optionsObject option子属性:name type默认值description用于驱动视频的...