Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are code level changes required for moving to load-balancing environment?

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.

like image 728
user3427540 Avatar asked May 30 '14 19:05

user3427540


1 Answers

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. ;)

like image 190
Ray V Avatar answered Oct 16 '22 04:10

Ray V