gpt4 book ai didi

kubernetes - RabbitMQ和Kubernetes

转载 作者:行者123 更新时间:2023-12-02 12:05:58 25 4
gpt4 key购买 nike

我们想将RabbitMQ与Kubernetes一起使用,但是我们发现一些意见告诉我们,这不是很容易,甚至是不可能的。
例如,人们说,当 pod 掉落时,要正确地建立RabbitMQ的节点并不容易。

我的问题是真的不可能吗,如果响应为“否”,是否有一些最佳实践可以了解实现?

谢谢你的帮助

最佳答案

这个问题太笼统了,顺便说一句,可以在k8s上使用rmq。

您可以在此处找到有关该文档的文档:

http://www.rabbitmq.com/cluster-formation.html#peer-discovery-k8s

It is highly recommended that RabbitMQ clusters are deployed using a stateful set. If a stateless set is used recreated nodes will not have their persisted data and will start as blank nodes. This can lead to data loss and higher network traffic volume due to more frequent eager synchronisation of newly joining nodes. Stateless sets are also prone to the natural race condition during initial cluster formation, unlike stateful sets that initialise pods one by one.



在这里您可以找到完整的示例:

https://github.com/rabbitmq/rabbitmq-peer-discovery-k8s/tree/master/examples/k8s_statefulsets

关于kubernetes - RabbitMQ和Kubernetes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53176859/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com