如何使用一致的散列将多个服务器分配给同一密钥?

发布于 2025-01-17 23:52:00 字数 308 浏览 2 评论 0原文

我正在阅读有关Design Ticketmaster的系统设计文章。它提到: 我们可以使用一致的散列将应用程序服务器分配给基于“ ShowID”的ActiverEservationservice和WaitchUserService。这样,特定节目的所有预订和等待用户都将由一组服务器处理。让我们假设负载平衡我们一致的散列量分配三个服务器,以供任何show 但是我对一致的哈希的理解是,我们将计算哈希(ShowID),并在哈希环上找到此值,然后顺时针旋转并找到将是要使用的服务器的下一个节点。因此,我认为ShowID将始终进入同一家服务器。我们如何为任何节目分配三个服务器? 谢谢你!

I'm reading a system design article about design ticketmaster. It mentions:
We can use the Consistent Hashing to allocate application servers for both ActiveReservationService and WaitingUserService based upon the ‘ShowID’. This way, all reservations and waiting users of a particular show will be handled by a certain set of servers. Let’s assume for load balancing our Consistent Hashing allocates three servers for any Show
But my understanding of consistent hashing is we will calculate hash(showID), and find this value on the hash ring, then go clockwise and find the next node which will be the server to use. Thus I imagine the showID will always go to the same server. How we allocates three servers for any Show?
Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文