Hi
I am looking for the best way to design or purchase a loadbalancer component using .Net remoting.
I have an architecture where several servers using .net remoting are used to sevice client
apps. The loadbalancer should conduct the call of any client app to the least loaded server.
What I have done so far is implementing a small loadbalancer component that keeps track
of the available servers and their load. When a new client app wants to login and use
the services offered by the servers, it should ask (transparently) the loadbalancer for the least loaded
server. The loadbalancer will then return an ObjRef object which the client app will use
to authenticate itself to the least loaded server and start using its services.
If anyone has a better idea, or know of commercial product please let me now.
regards

.Net Remoting load balancer needed
m.a.fuchs
hello guys
thx for your reply. However, the issue is not about Webservice or ASP.Net it is about .Net remoting
The .Net Remoting was used for efficiency and performance, since all the client apps are .Net and not separated from the servers by firewalls. Each client may trigger a calculation on the server that will take hours to complete, so many servers are required to handle the calls.
Your poposals of webservice are good for B2B scenario or inter-technology communication, which is not the case I am handling.
regards
Marzk
Sounds to me like you need to have a Controller, which knows the state of all the work in your farm. Your client app then calls the Controller to find out which server to use for the major call.
You could use some of the performance counters to decide which server currently has the least amount of work.
R.Tutus
Hi;
Since you make long running operations on the server, regardless if it was statless or not makes your current approach reasonable (I should have noted that
). Anyway, I think the most important thing is to make sure about the number of calls being executed by each server, Simple round robin will not work as you will never be sure how many requests are being handled by each server. Make sure that you properly track calls issued to each server and the time when it ends. You can push things to more complex scenario by adding weights to each call type depending on its memory and CPU usage which makes you keep track of the average load on each server.
I hope you find this a better answer:)
KonRi
You can always use IIS to host your Remoting servers by reconfiguring your client/servers. This will allow you take full advantage of IIS. (well, unless your .Remoting developers hardcoded the channels in a way that you can't reconfigure to use IIS, which would obviously be a bad design decision)
You may consider using server clustering - in the case of Windows, you can cluster more than just 2 servers if you use Data Center editions.
You may also consider investing in Local Director-type hardware.
I prefer hardware-based solutions, since your question was really asking for a "better" solution than yours.
If you really need a software-based solution, since you seem to have implied that all of your .NET clients/servers can freely talk to each other without being firewalled, a better load balancer is one on the client side. Give each client (access to) a tiny component and have the client connect to the server returned from that tiny component. The best server for a particular client at a particular moment is determined by that component. Actually, where to deploy this component is really up to you. Just pick a most convenient location. It can be even another .NET server by itself, and an extremely lightweight one for sure.
If you use a software-based server-side load-balancer component as you described, you are creating a single point of failure! Therefore, it's worse than a well-placed client-side one.
Hope the above helps.
henry
=== Edited by HCTwinJava @ 05 Mar 2007 10:40 PM UTC===
PS. you could use WMI to achieve the effect of "broadcasting" your server farm load distribution information. If possible, you could have every client use this information to achieve your goal. Even if yuo can't modify any code, remember: which Remoting server to connect can be configured at runtime for each and every client.
Kamalkanth Nayak
Agree...
More clarification: Normally you should use load balancing provided by the operating system as mentioned. The only reason that might make you implement a custom load balancer is when your application uses in-memory state which make a client must refer to a certain machine that maintains his state information. That was a problem in classic ASP and people had to implement their custom load balancer like you currently do. In .Net framework, ASP .Net provides database managed state, which makes all machines in load balancing environment able to handle his requests by optaining session information from the shared database.
Mahmoud_Fayed
J A Y
Agree with Ben,
Sounds as though you need a Controller\Load Balancing Proxy that will determine and then route the call to the most appropriate server in your 'farm' - from the calling process (winforms app i guess) point it does not know\care the proxy will be doing some analysis of the servers before routing the request, it just fires off the request and expects the proxy to process the work.
Now how complicated you make the proxy is up to you, I guess the heristics for the alogrithm will be determined partly against physical server load (CPU, memory etc) and the individual business process - some business processes are very short but require lots of CPU\memory and some are long running but require little CPU\memory etc. In future you can add analysis\reporting to the proxy to all you to 'tune' performance accordingly.
Sounds like an interesting problem :)
HTH
Ollie Riches
Zen_Rain
I agree with henry.. if your server side calls would have got approx same amount of resource requirements, NLB on IIS would have worked.
as your calls can vary very much in resource usage u need to have closed loop for effective load balancing. Client side load balancing component suggested by henry is good or u can have same stuff at server side also but dont put it on critical path .. means dont make it a single point of failure but integrate it as an add on service which when available should be used.
http://DotNetWithMe.blogspot.com
vikas goyal