8
votes

My client wants to move to a ColdFusion load-balancing environment for better availability and scalability of the site. I know how to setup clusters and instances in the ColdFusion Admin. We should also use J2EE session mgmt for sticky sessions.

But I am not sure of other code level changes required while moving from a single server to load-balancing environment.

Anyone having any experience please suggest? Or any helpful links.

1
I agree with the the "official line" of why this was put on hold, but... it's a bloody good question. And an aggregation of notes / suggestions on the topic must surely be a useful resource for people googling it later. Is that not the whole idea here? This smacks of a flaw in the way S/O considers what questions are meritorious or not.Adam Cameron
Be careful about criticising the way things are being done. It might be construed as volunteering to do it better.Dan Bracuk
No, it usually just results in being told "you don't understand Stack Overflow" in a patronising tone.Adam Cameron
Are you talking about clustering on a single server or load balancing cross multiple servers? These are not the same and offer different types of high availability effectiveness.Dave Ferguson
Using a single server and running multiple CF engines for clustering will give you CF failure redundancy. However, what if the server fails? Clustering on a single server gives you no protection for that. Load balance first, then cluster if you have to.Dave Ferguson

1 Answers

1
votes

Skipping the session scoped issues you're bound to enjoy I'll focus on less common code level strategies.

You will have 2+ isolated application scopes. This creates challenges in synchronicity. Examine the app code for writes to the app scope. Should some condition require updating an app scoped value, that value must be reflected in all sibling application scopes.

Know that each instance will have its own onApplicationStart() & onApplicationEnd() events. Depending on what happens in the code, it could cause mischief.

Be aware of things like FuseBox (framework) when load balancing. FuseBox generates files locally that are not replicated on other server instances.

When logging, emailing errors, etc., use an instance identifier so you'll know which server you're working with.

Should your app need the originating IP address of a request, you may need to enable X-Forwarded-For HTTP headers within your load balancer. Otherwise, you could get the IP of the load balancer on every request.

Verify Identical on EACH Instance:

  • Security implementations
  • ColdFusion & Java versions
  • Datasources
  • Mappings
  • Virtual directories
  • Shared resource locations ..
  • CF Admin settings: site-wide error handling, etc.
  • CF account privileges, Important!

Consider using the ColdFusion Server Manager to assist consistification. ;)