简体   繁体   English

在服务器之间分发服务的多个副本的最佳方法是什么?

[英]What's the best way to distribute multiple copies of services across servers?

We have multiple services that do some heavy data processing that we'd like to put multiple copies of them across multiple servers. 我们有多种服务可以处理一些繁重的数据,我们希望将它们的多个副本放置在多个服务器上。 Basically the idea is this: 基本上是这样的:

  • Create multiple copies of identical servers with the collection of services running on them 创建相同服务器的多个副本,并在其上运行服务集合
  • a separate server will have an executable stub that will be run to contact one of these servers (determined arbitrarily from a list) to begin the data processing 单独的服务器将具有可执行存根,该存根将运行以与这些服务器之一(从列表中任意确定)联系以开始数据处理
  • The first server to be contacted will become the "master" server and delegate the various data processing tasks to the other "slave" servers. 要联系的第一台服务器将成为“主”服务器,并将各种数据处理任务委托给其他“从”服务器。

We've spent quite a bit of time figuring out how to architect this and I think the design should work quite well but I thought I'd see if anyone had any suggestions on how to improve this approach. 我们花了很多时间来弄清楚如何进行架构设计,我认为设计应该可以很好地工作,但是我想我是否可以就如何改进此方法提出任何建议。

The solution is to use a load balancer.. 解决方案是使用负载平衡器。

I am bit biased here - since I am from WSO2 - the open source WSO2 ESB can be used as a load balancer - and it has the flexibility of load balancing and routing based on different criteria. 由于来自WSO2,我对此有点偏见-开源WSO2 ESB可以用作负载平衡器,并且它具有基于不同标准的负载平衡和路由的灵活性。 Also it supports FO load balancing as well... 它还支持FO负载平衡...

Here are few samples related to load balancing with WSO2 ESB... 以下是与使用WSO2 ESB进行负载平衡有关的一些示例...

You can download the product from here ... 您可以从这里下载产品...

eBay is using WSO2 ESB to process more than 1 Billion transactions per day in their main stream API traffic... eBay正在使用WSO2 ESB在其主流API流量中每天处理超过10亿笔交易...

The first server to be contacted will become the "master" server and delegate the various data processing tasks to the other "slave" servers. 要联系的第一台服务器将成为“主”服务器,并将各种数据处理任务委托给其他“从”服务器。

That is definitely not how I would build this. 绝对不是我要如何构建它。

I build this with the intent to use cloud computing (regardless of whether it uses true cloud computing or not). 我建立此数据库的目的是使用云计算(无论它是否使用真正的云计算)。 I would have a service that would receive requests and save those requests to a queue. 我会有一个可以接收请求并将这些请求保存到队列的服务。 I would then have multiple worker applications that will take an item from the queue, mark it in process and do whatever needs done. 然后,我将拥有多个工作程序,这些工作程序将从队列中取出一个项目,将其标记为正在处理中,并执行需要完成的所有操作。 Upon completion the queue item is updated as done. 完成后,队列项目将更新为已完成。

At this point I would either notify the client that the work is done, or you could have the client poll the server for reading the status of the queue. 此时,我要么通知客户端工作已完成,要么可以让客户端轮询服务器以读取队列的状态。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在多个服务/组件之间跟踪性能的最佳方法是什么 - What is the best way to track performance across multiple services/components 测试 WCF 服务的最佳方法是什么? - What's the best way to test WCF services? 在C#中,在多条源代码行之间散布单行字符串文字的最佳方法是什么? - In C#, what's the best way to spread a single-line string literal across multiple source lines? 在C#.net中跨SQL Server处理事务的最佳方法是什么? - What is the best way to handle transaction across SQL Servers in C#.net? 跨服务器的WCF服务 - WCF Services across servers 在多个对象之间共享对象实例的最佳方法是什么? - What's the best way to share an instance of an object across many objects? 在多个项目中重用数据库访问以确保更新后不会破坏任何项目的最佳方法是什么? - What's the best way to reuse database access across multiple projects to ensure that when updated it does not break any projects? 在多个列表中分配非唯一元素的最有效方法 - Most efficient way to distribute non unique elements across multiple lists 如何快速在多个分区/服务器之间平均分配文件? - How can I quickly distribute files equally across multiple partitions / servers? 在web.config的mailSettings部分中处理多个邮件服务器的最佳方法是什么? - What is the best way to handle multiple mail servers in the mailSettings section of the web.config?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM