Accessing Cluster Instances That Are Hidden Behind A Domain Name
- Makes it easy to make the CF Admin available without having to expose it to the public
- Removes complications that can arise when you need to use RDS, the server monitor, etc
- Allows me to access specific instances when I need to when I'm remoted into the machine
The first problem this poses is that from the instance that the user is currently logged in to, code needs to be executed on the other 3 instances so that they also refresh their memory cache. That's simple enough to achieve - just create a page or webservice that any one server can call on the others. You need to know what instance you're on so you know what the other 3 instances are, which also isn't very difficult (see a post of mine from a while ago at http://www.horwith.com/index.cfm?mode=entry&entry=80134845-E081-0478-475B6D83D8FAF903).
Unfortunately, the application itself is only accessible via very specific domain names... so I can't just send an HTTP or SOAP request to "127.0.0.1:830x" - all requests to this application must run through "www.x.com", which poses a problem when you need to access each instance specifically. A relatively simple solution is to send your HTTP request to the page/service via the domain name with a JSESSIONID cookie that you know belongs to the server instance you want to run the request. To get a valid session value for any one instance, I created a cfm file beneath the internal JRun web server on each instance, that just returns the session id. That file looks like:
<cfoutput>#session.sessionID#</cfoutput>

There are no comments for this entry.
[Add Comment]