Hi,
I have 4 web server instances running on the same machine behind a load balancer. All the instances are serving the same application. I want a module taken out the of these 4 instances and run it as a separate service, so that i can reduce the load on the above 4 instances.This service needs to send back a simple json response after doing some index search,service is not exposed to any outside client. So given this simple requirement, what would be the best solution to implement the new service, mainly considering performance . Will it be RMI or socket programming or is there any other solution. Will I have to sacrifice performance if I go for RMI instead of socket programming?
I am not able to understand why socket programming is needed here. Maybe I am not getting the requirement correct.
Why not have a firewall to block anything that is not allowed to access?
Its easy, decoupled and configurable from my point of view.
Amit Ghorpade wrote:I am not able to understand why socket programming is needed here. Maybe I am not getting the requirement correct.
Why not have a firewall to block anything that is not allowed to access?
Its easy, decoupled and configurable from my point of view.
Hope this helps
As I said, we already have for web server instances running on the same machine behind a load balancer. All the instances are having the same application deployed. I want to take a module out of this 4 instances and run it as a separate services so that I can reduce load on server instances. All the server instances will communicate with this new service to get response.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
I'd probably use a RESTful web service for this. I can't really think of any reason why I'd use RMI these days, or bother with sockets. The prevalent REST libraries (like Jersey) make both the client and server side pretty easy to develop.
Anoop Isaac wrote:we already have for web server instances running on the same machine behind a load balancer.
I can't imagine any reason to do such a thing. You use a load balancer to spread load between separate machines. It makes no sense to run 4 instances on one box and load balance between them. You lose all sharing of state, etc.
Further, I agree with Tim, there is no reason to use RMI in this case. Don't do it.