Anonymous
Guest Aug 10, 2005
7:06 AM
|
We are running a round-robin load balanced pool of 4 servers. I would like to be able to identify the server servrving the page in the html. What would work best?
|
Anonymous
Guest Aug 10, 2005
11:02 AM
|
Try inserting HTML comments to name the server. That is the way we do it.
SD
|
Anonymous
Guest Aug 10, 2005
1:02 PM
|
Yes just to add to that, inserting the comment in the application file should do the trick.
|
Anonymous
Guest Aug 11, 2005
8:56 AM
|
Can you explain further? The files get synched across all servers so they need to be exact on each server
|
Anonymous
Guest Aug 11, 2005
4:50 PM
|
Your Application.cfm could include an id.cfm file which stays unique and does not get updated ever.
This file would have the id of that server.
Let me know if you need furthure explaination.
SD
|
winter
1 post Jan 25, 2006
10:17 AM
|
While you could do this using cfexecute to call "set" through a .bat file, among other methods, the most straightforward would likely be to pull the value straight from the registry, like so:
<cfoutput> <cfregistry action="get" branch="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" entry="ComputerName" type="String" variable="RegValue"> Computer name is #RegValue# </cfoutput>
Last Edited winter on 25-Jan-2006 10:19 AM
|
sdizier
5 posts Jan 25, 2006
10:35 AM
|
Although the last response is a good answer, be aware that it may add overhead where it is not needed. Especialy since this will be called on all pages.
SD ---------- Adventure Friendly
|
winter
3 posts Jan 25, 2006
10:39 AM
|
Very good point! For high-load situations, it would certainly make more sense (and reduce overhead) to adopt the previously mentioned method of having an id.cfm which would contain the server's name, and be excluded from the cross-server synchronization process.
|