多个 gearman 服务器可以共享同一个 libdrizzle 队列吗?
多个 gearman 服务器可以通过 libdrizzle 共享同一个 gearman 队列吗?
我想知道这是否会消除 gearman 服务器的单点故障——如果我有多个 Web 节点,每个节点都与同一个 gearman 服务器通信,那么如果 gearman 不可用,则该站点就会崩溃。但是,如果每个 Web 节点都运行自己的 gearman 服务器(并且该节点生成的作业将排队到在同一节点上运行的 gearman 服务器),则单点故障将转移到数据库。 (无论如何,在我们的架构中,这都是单点故障。)
Can multiple gearman servers share the same gearman queue, via libdrizzle?
I'm wondering if this will eliminate the gearman server as a single point of failure--if I have multiple web nodes, each talking to the same gearman server, then the site dies if gearman becomes unavailable. However, if each of the web nodes is running its own gearman server (and jobs generated by that node are queued to the gearman server running on the same node), then the single point of failure is moved to the database. (Which, in our architecture, is a single point of failure anyway.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。该队列仅用作内存队列失败时的备份(如果 Gearman 死亡,作业仍将存储在数据库中)。持久队列仅在启动时读取,而不是在作业处理期间读取。
这并不意味着您不能拥有两台 Gearman 服务器并将这两台服务器添加到您的客户端和工作人员(以便工作人员在两台服务器上注册)并以这种方式获得冗余。无论如何,我不能说最近有一台 gearman 服务器死机了,但你至少会得到额外的故障保护。
No. The queue is only used as a backup in case the in memory queue fails (if Gearman dies, the jobs will still be stored in the database). The persistent queue is only read at startup, and not during job processing.
This doesn't mean that you can't have two Gearman servers and add both the servers to your clients and workers (so that the workers register with both servers) and have redundancy that way. I can't say that I've had a gearman server die on me recently anyways, but you'll at least get an extra level of failsafe.