Running cold fusion standard, so i can only have 1 instance of the coldfusion tomcat host per machine.

https://helpx.adobe.com/coldfusion/configuring-administering/web-server-management.html#IIS says it's fine to have two websites send over to the same isntance, but i was wondering if it's still fine if the two websites are almost exactly the same code base, same file names, etc. We were looking at this option to run two slightly different sites of the same server, aka only change a few files and let vhost routing make it so different users get different experience.

I understand double the load means double the resources for tomcat, but we you can assume it's properly sized. I'm just wondering if there are technical/concurrent problems with doing it this way. EG: would coldfusion compiler cache things incorrectly, or maybe it uses distinct class loaders per IIS virtualdir, or maybe it's all checksum based on the hash of the cfm file...


As long as each application has a unique name in application.cfc, it should work fine.

In application.cfc:

this.name = “this-needs-to-be-unique”;
  • what kind of issues would i see if i left them both unamed? session collision? – Chris DaMour Sep 9 at 20:19
  • They would likely share the same application space, but I’m not entirely sure. You could log or otherwise output the name from the application.cfc onRequest() method to see if they both share the same name. If they do, both apps will share the same application memory in the heap, so one could affect the other. They would also share the same session memory. – Redtopia Sep 9 at 20:22
  • there's only 1 tomcat, so they're sharing heap no matter what. but it does appear that CF shards by application name helpx.adobe.com/coldfusion/developing-applications/… so i guess if the session cookie worked for both sites (shared domain on cookie) they could collide, i'll have to test that out – Chris DaMour Sep 10 at 16:33
  • Perhaps you could explain what you are trying to achieve. I’ve run multiple sites using the exact same code base on a single server for years. But they all had a unique application.name, which is an important distinction. If they all share the same name, then you’re going to run into some side affects, that may or may not be problematic, depending on what you’re trying to achieve. – Redtopia Sep 10 at 17:07
  • 1
    Since this is not the way CFML apps should be configured, I could only speculate. First, and probably most important, would be that both apps would share session data. But also since you said the code is almost exactly the same code base, then I would expect problems with the compiling/caching of the java byte code. I asked what you are trying to do because there's most likely a better approach than what you're proposing here. E.g., if you want two separate experiences, then do you split testing inside the app itself, and modularize the code changes into distinct independent units. – Redtopia Sep 11 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.