开发者

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

开发者 https://www.devze.com 2023-04-06 15:32 出处:网络
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:

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 开发者_JAVA百科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. Also it supports FO load balancing as well...

Here are few samples related to load balancing with 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...


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号