前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >RabbitMQ集群II5

RabbitMQ集群II5

作者头像
franket
发布2022-05-03 11:15:50
2010
发布2022-05-03 11:15:50
举报
文章被收录于专栏:技术杂记

内存节点集群

内存node是将所有元数据保存在内存中的node,是以一定安全风险为代价交换性能的选择,由于不保存数据到硬盘,所以断电或重启后数据将会丢失,也正因为不必与硬盘打交道,所以速度会非常快

一般使用它来动态地扩展集群性能(只使用RAM node的集群是脆弱的)

RAM nodes keep their metadata only in memory. As RAM nodes don’t have to write to disc as much as disc nodes, they can perform better. However, note that since persistent queue data is always stored on disc, the performance improvements will affect only resource management (e.g. adding/removing queues, exchanges, or vhosts), but not publishing or consuming speed. RAM nodes are an advanced use case; when setting up your first cluster you should simply not use them. You should have enough disc nodes to handle your redundancy requirements, then if necessary add additional RAM nodes for scale. A cluster containing only RAM nodes is fragile; if the cluster stops you will not be able to start it again and will lose all data. RabbitMQ will prevent the creation of a RAM-node-only cluster in many situations, but it can’t absolutely prevent it. The examples here show a cluster with one disc and one RAM node for simplicity only; such a cluster is a poor design choice.


创建内存node

使用下面方法创建内存node

代码语言:javascript
复制
[root@h101 ~]# rabbitmqctl  -n rabbit  cluster_status
Cluster status of node rabbit@h101 ...
[{nodes,[{disc,[rabbit@h101]}]},
 {running_nodes,[rabbit@h101]},
 {cluster_name,<<"hare@h101.temp">>},
 {partitions,[]}]
[root@h101 ~]# rabbitmqctl  -n hare  cluster_status
Cluster status of node hare@h101 ...
[{nodes,[{disc,[hare@h101]}]},
 {running_nodes,[hare@h101]},
 {cluster_name,<<"hare@h101.temp">>},
 {partitions,[]}]
[root@h101 ~]# rabbitmqctl  -n rabbit stop_app 
Stopping node rabbit@h101 ...
[root@h101 ~]# rabbitmqctl  -n rabbit join_cluster --ram hare@h101
Clustering node rabbit@h101 with hare@h101 ...
[root@h101 ~]# rabbitmqctl  -n rabbit  start_app 
Starting node rabbit@h101 ...
[root@h101 ~]# rabbitmqctl  -n rabbit  cluster_status
Cluster status of node rabbit@h101 ...
[{nodes,[{disc,[hare@h101]},{ram,[rabbit@h101]}]},
 {running_nodes,[hare@h101,rabbit@h101]},
 {cluster_name,<<"hare@h101.temp">>},
 {partitions,[]}]
[root@h101 ~]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 内存节点集群
  • 创建内存node
相关产品与服务
对象存储
对象存储(Cloud Object Storage,COS)是由腾讯云推出的无目录层次结构、无数据格式限制,可容纳海量数据且支持 HTTP/HTTPS 协议访问的分布式存储服务。腾讯云 COS 的存储桶空间无容量上限,无需分区管理,适用于 CDN 数据分发、数据万象处理或大数据计算与分析的数据湖等多种场景。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档