Forum Discussion
Don_22992
Oct 06, 2009Nimbostratus
Load balancing Java RMI calls
Can the BigIp load balance Java RMI connections?
BigIp LTM upfront, with JBoss web servers as backend clients. Web clients need to communicate with other applications (on backend serve...
Hamish
Dec 22, 2009Cirrocumulus
A quick look at an RMI whitepaper I found shows that you can force RMI to happen over port 443 or port 80 if you block the direct communications (It's supposed to be automatic I think...
Firewalls
RMI provides a means for clients behind firewalls to communicate with remote servers. This allows you to use RMI to deploy clients on the Internet, such as in applets available on the World Wide Web. Traversing the client's firewall can slow down communication, so RMI uses the fastest successful technique to connect between client and server. The technique is discovered by the reference for UnicastRemoteObject on the first attempt the client makes to communicate with the server by trying each of three possibilities in turn:
* Communicate directly to the server's port using sockets.
* If this fails, build a URL to the server's host and port and use an HTTP POST request on that URL, sending the information to the skeleton as the body of the POST. If successful, the results of the post are the skeleton's response to the stub.
* If this also fails, build a URL to the server's host using port 80, the standard HTTP port, using a CGI script that will forward the posted RMI request to the server.
Whichever of these three techniques succeeds first is used for all future communication with the server. If none of these techniques succeeds, the remote method invocation fails.
This three-stage back-off allows clients to communicate as efficiently as possible, in most cases using direct socket connections. On systems with no firewall, or with communication inside an enterprise behind a firewall, the client will directly connect to the server using sockets. The secondary communication techniques are significantly slower than direct communication, but their use enables you to write clients that can be used broadly across the Internet and Web.
So then it becomes a simpler method of performing load balancing with plain HTTP/HTTPS... (YMMV. I haven't tried this. If the code runs off with your girlfriend it's not my fault).
H
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects