高可用消息队列服务构建-RABBITMQ
来源:互联网 发布:2k15球员数据名单 编辑:程序博客网 时间:2024/06/03 20:39
目录(?)[+]
openstack采用了一个松耦合的方式来进行各个组建之间的通信,具体来讲组建之间的通信是通过rabbitmq的消息队列进行的。
当openstack系统规模变大时,消息队列就成为了性能发挥的瓶颈。
网上有人给出了集群化的消息队列配置方案,如下:
原文:http://www.sebastien-han.fr/blog/2012/05/21/openstack-high-availability-rabbitmq/
Rabbitmq has his own buildin cluster management system. Here, we don’t need Pacemaker, everything is managed by RabbitMQ itself.
RabbitMQ or more generally the management queues layer is a critical component of OpenStack because every requests/queries use this layer to communicate.
CLUSTERING SETUP
RabbitMQ generates a cookie for each server instance. This cookie must be the same on each member of the cluster:
Check your cluster status, on the node 01 or 02, whatever:
Eventually check your queues on both nodes, they should be identical:
Cluster nodes can be of two types: disk or ram. Disk nodes replicate data in ram and on disk, thus providing redundancy in the event of node failure and recovery from global events such as power failure across all nodes. Ram nodes replicate data in ram only and are mainly used for scalability. A cluster must always have at least one disk node.
You can also verify that the connection is well established between the node:
TIPS
CHANGE THE IP OR THE HOSTNAME OF A NODE
If you changed you IP address or your hostname, this is pretty nasty and harsh but it works:
The IP address and/or will be refresh in the rabbitmq database.
CONVERT RAM NODE TO DISK NODE
HAPROXY CONFIGURATION
Clustering doesn’t mean high-availability, this is why I put a load-balancer on top. Here HAProxy will balance the request only on one node, if this node fails the request will be route to the other node. It’s simple as that. The native port of HAproxy and the OpenStack queues ports are configured.
global log 127.0.0.1 local0 #log loghost local0 info maxconn 1024 #chroot /usr/share/haproxy user haproxy group haproxy daemon #debug #quietdefaults log global#log 127.0.0.1:514 local0 debug log 127.0.0.1 local1 debug mode tcp option tcplog option dontlognull retries 3 option redispatch maxconn 1024# Default! timeout connect 5000ms timeout client 50000ms timeout server 50000mslisten rabbitmq_cluster 0.0.0.0:4369 mode tcp balance roundrobin server server-07_active 172.17.1.8:4369 check inter 5000 rise 2 fall 3 server server-08_backup 172.17.1.9:4369 backup check inter 5000 rise 2 fall 3listen rabbitmq_cluster_openstack 0.0.0.0:5672 mode tcp balance roundrobin server server-07_active 172.17.1.8:5672 check inter 5000 rise 2 fall 3 server server-08_backup 172.17.1.9:5672 backup check inter 5000 rise 2 fall 3
Et voilà!
- 高可用消息队列服务构建-RABBITMQ
- 高可用消息队列服务构建-RABBITMQ
- RabbitMQ+HAProxy构建高可用消息队列
- (十)RabbitMQ消息队列-高可用集群部署实战
- (十一)RabbitMQ消息队列-如何实现高可用
- RabbitMQ源码解析前奏--高可用队列
- Rabbitmq队列高可用的策略
- RabbitMQ高可用镜像队列
- 高可用rabbitmq集群服务部署步骤
- 高可用rabbitmq集群服务部署步骤
- zookeeper+activemq实现高可用消息队列
- hystrix构建高可用服务架构
- Activemq构建高并发、高可用的大规模消息系统
- RabbitMQ系列二(构建消息队列机制)
- Rabbitmq集群高可用
- Rabbitmq集群高可用
- Rabbitmq集群高可用
- rabbitmq+keepalived高可用
- Windows SDK API是个啥意思?
- 10亿以内的自守数
- integer.bytevalue()
- 让文件块变成可操作的文件系统
- Go实践-文件系统操作
- 高可用消息队列服务构建-RABBITMQ
- 动态规划+背包问题 扩展
- 加上了开头影片和进度条
- openstack中 novnc配置相关选项 VNC配置
- jsp中两种跳转方式及区别
- 详解大端 小端 (函数判断及转换)
- jbpm设计活动之state
- C语言编译指示字#error #warning #line
- android之多媒体篇(一)