Seybsen
Seybsen

Reputation: 15587

Call onApplicationStart reinitializing application on cluster with sticky sessions

I'm using an URL parameter to reinitialize an ColdFusion application which is running on a cluster of two instances on the same machine. Sticky sessions is enabled.

In the Application.cfc's onApplicationStart function I'm initializing some CFCs and setting them in the persistent Application-Scope.

The problem I'm facing now is, that when calling www.example.com/?reinitApp only the application on the instance where I am on at this moment gets restarted. I could use another browser and hope that I'll get a session on the other instance, but that is not a satisfying solution. Does anybody has an idea of how to do this right/better?

Upvotes: 2

Views: 115

Answers (1)

Adam Cameron
Adam Cameron

Reputation: 29870

Have separate server-specific subdomain names so you can hit each directly, eg: server1.example.com/?reinitApp, server2.example.com/?reinitApp

That's probably the most expedient approach?

Upvotes: 3

Related Questions