Using Apache as a Reverse-Proxy/Load Balancer for iNotes/Verse (Oldie)

This is an old post from BleedYellow sometime in 2011. I was recently chatting with someone about the topic of options for load balancers for iNotes/Verse. Here’s what I had posted at the time for my future reference. There are some good notes on this one about ensuring your session persistence is set properly. Some of the same general considerations would also apply for other load balancing applications such as HAProxy or nginx.

The Quest:
The other week I set out to tackle using Apache as a Load Balancer for a cluster of iNotes servers. I found some good basic documentation on this, and it was mostly working after tinkering with that. But then I came across an excellent tutorial by David Greenstein – Ubuntu as an iNotes Reverse Proxy/Balancer. Exactly what I needed!

After reading his article, I found that I did have everything setup properly except I had not enabled the rewrite module. After doing this, all seemed to work well. The only problem I ran into was with sending attachments. The error I received was this exact error, but it didn’t match my configuration. I was able to trace the problem to the session persistence. Even though Apache was configured for JSESSIONID as the stickysession value, this was not being honored in every situation. 

The Solution:
After some digging into the documentation for the Apache modules further, I came across what appears to have corrected this issue for us. In the Proxy Balancer Module documentation, it’s possible to use the Headers Module to write a new cookie to the browser. Then, this cookie will be used for the session stickiness.  For those of you tracking along with David’s documentation, the following is all you will need to do: 

  1. Enable the Headers Module
  2. Before the Proxy directive in the inotes.conf, insert this line:
    Header add Set-Cookie “ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/” env=BALANCER_ROUTE_CHANGED
  3. In the inotes.conf, change the sticky session from JSESSIONID to ROUTEID (which is the name of the cookie you set above).

Some additional info:

  • Knowledge of Apache is needed, of course. Apache can do a LOT more than you think. 
  • Using Ubuntu, this is free for you. So get to know Linux! But it will work with Windows as well
  • In addition to what David mentioned about making sure that you have a working Domino Cluster with WebSSO working and iNotes configured the same, you’ll want to make sure that the servers and templates are all at the same version! The good thing about this now that you are using a load balanced/failover/ha configuration, you can disable the server(s) that you have not yet upgraded so that the users still have a consistent experience. Then, once you’re ready to upgrade one of the other servers, just re-enable the upgraded server(s) and disable the others. The users won’t even know!!
  • Also, regarding your clustering, make sure that you don’t have delays with your cluster replication. You may need to enable more cluster replicators. This is often overlooked, and I just wanted to reiterate it!
  • This should work very well for a smaller environment with the users all being homed across servers on the same cluster. However, with some additional work it should also scale pretty well.

2 thoughts on “Using Apache as a Reverse-Proxy/Load Balancer for iNotes/Verse (Oldie)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s