Friday, November 19, 2010

How to load balance multiple WebSphere Application Servers that are not in a cluster?

As the title said, I have multiple WebSphere Application Servers in the environment but they are not in a cluster. More specifically, I have a Node with 2 Application Servers (server1 and server2). I want to load balance them using the IBM HTTP Server. How to archive this?

Since the two Application Servers are not in a cluster, the generated plugin-cfg.xml contains two separate ServerCluster elements. Each ServerCluster element has one Server element only. Obviously, IBM HTTP Server won't know how to load balance them. So, what I had to do is to modify the plugin-cfg.xml to minmic a cluster configuration. i.e.
  1. One ServerCluster element with 2 child Server elements
  2. Each Server element has an unique CloneID (this is required for session affinity)
  3. Add the PrimaryServers element with 2 child Server elements to the ServerCluster element
Restart the HTTP Server and that's it.

Saturday, September 18, 2010

WCF - Send Secured Messages and Receive Unsecured Responses

When WS-Security is enabled, WCF expect the response has the same encryption & signing requirements as the request. If the server returns an unsecured response message or SOAP fault, WCF will throw the MessageSecurityException.

To resolve this, you can get a hotfix from Microsoft, http://support.microsoft.com/kb/971493/

After the hotfix is applied, all you have to do is to set the new EnableUnsecuredResponse attribute to true.

NOTE: It only works with CustomBinding.