在多个服务器之间划分代码中的请求
我有几个论坛服务器(它们是什么无关紧要),它们存储用户的帖子,我希望能够在这些服务器之间划分请求。我目前倾向于按地理位置对它们进行分区。为了提高数据的本地化,用户将被分为区域,例如北美、南美等。
有没有什么设计模式可以实现将分区属性映射到服务器的功能,使这段代码具有高可用性,并且不会成为单点故障?
f( Region ) -> Server IP
I have several forum servers (what they are is irrelevant) which stores posts from users and I want to be able to partition requests among these servers. I'm currently leaning towards partitioning them by geographic location. To improve the locality of data, users will be separated into regions e.g. North America, South America and so on.
Is there any design pattern on how to implement the function that maps the partioning property to the server, so that this piece of code has high availability and would not become a single point of failure ?
f( Region ) -> Server IP
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您听过 Jason 采访的 Matt Mullenweg(Wordpress 创始人) TWiST #26 中的 Calacanis,唯一有效的高可用性方法是“水平扩展”(即“每个大陆有很多数据中心”,与专用于小型博客(低流量)的数据中心之间存在差异)跨大陆的复制较少,有些专门用于高流量博客)。
因此,没有什么神奇的解决方案,除了说:硬件更便宜,拥有尽可能多的数据中心。
If you listen to Matt Mullenweg (founder of Wordpress), interviewed by Jason Calacanis in TWiST #26, the only recipe for high-availability that worked was "horizontal expansion" (i.e. "lots and lots of data centers per continent", with a difference between those dedicated for small blogs (low traffic) with less replication across continents, and some dedicated for high-traffic blogs).
So no magic solution except than saying: hardware bing cheaper, have as many data center than you can.