Is it possible to run multiple instances of an application on the same server?
Copy link to clipboard
Copied
I'm in IT and we have a CF application running on CF10 and MS SQL on a single server.
I was asked if it's possible to run two instances of the same application with the second instance connected to a different db
Apparently they want to use one instance for the US and a second instance for Canada. Entirely separate businesses.
Thanks!
Copy link to clipboard
Copied
Yes, we can have multipule instance in coldfusion 10 please go though link
http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363c31-7ff4.html
We can connect them to different db
Please follow these step for creating multipule server instance
- In the ColdFusion Administrator, go to Enterprise Manager > Instance Manager.
- Click Add New Instance.
- Enter the server name and server directory.
- (Optional) Check Create Windows Service.
- Click Submit.In the Instance Manager, start, stop, restart, delete, access website, or access administrator.
- Click the Edit icon to edit the instance manager.
- Edit the internal webserver port and load balancing factor.Load balancing factor represents the load the instance takes up. Load balancing factor is applicable only if the instance is part of the cluster.For example, the load balancing factor for the first instance is 1 and that of the second instance is 2. The second instance receives two times more requests.
- Click Submit.
Copy link to clipboard
Copied
Thanks for the info, I will check it out when I get into the office Monday... quick question though, you mention Enterprise Manager. We are running CF10 Standard. Does this require the enterprise version?
Copy link to clipboard
Copied
This feature is only in enterprise edition please check the link for further product comparison
http://www.adobe.com/in/products/coldfusion-family/buying-guide.html
Copy link to clipboard
Copied
I'm reading all these links but they talk about multiple instances on MULTIPLE servers. I just want to verify before we spend $$$ to upgrade to Enterprise that my scenario is understood. I'm talking about multiple application instances on the SAME server, just running on a different port or at a different URL.
Copy link to clipboard
Copied
Hi,
Yes, you can have multiple instances on the same server, running on different ports.
Regards,
Anit Kumar
Copy link to clipboard
Copied
Holy cow!! It's $7K to upgrade from Standard to Enterprise!! I think it would make more sense just to buy another Standard license and set up a 2nd server. Thanks for all of the help.
Copy link to clipboard
Copied
Hello, I think you refer to multiple instances of an application as opposed to multiple instances of a server. I use ColdFusion 10 Standard for multiple applications on a single server. You mentioned in your post there is an option to refer to those applications by a different URL, so, say, you could have domain.com/USapplication and domain.com/CAapplication with a unique Application.cfc file for each. That Application.cfc file could then be configured as follows for US part:
<cfcomponent output="no">
<cfset THIS.name = 'USapplication />
<cfset THIS.dataSource = 'USdatabase' />
<cfset THIS.sessionManagement = TRUE />
<cfset THIS.ormEnabled = TRUE />
</cfcomponent>
And for CA part:
<cfcomponent output="no">
<cfset THIS.name = 'CAapplication />
<cfset THIS.dataSource = 'CAdatabase' />
<cfset THIS.sessionManagement = TRUE />
<cfset THIS.ormEnabled = TRUE />
</cfcomponent>
Alternative to this configuration might be using different domains at a same IP address.
Hope this helps,
Peter
Copy link to clipboard
Copied
Oh fish!!!! completely agree with Mr Petro Bochan thanks a lot sir.... How can i miss sach a thing..............
Copy link to clipboard
Copied
@Petro Bochan
What you desribe is the standard (and, in my opinion, best) way to do it. However, I would define the datasource in the onApplicationStart method instead. Something like
<cfcomponent output="no">
<cfset THIS.name = 'USapplication />
<cfset THIS.sessionManagement = TRUE />
<cfset THIS.ormEnabled = TRUE />
<cffunction name="onApplicationStart" returntype="boolean">
<cfset application.appDSN = "USdatabase">
<cfreturn true>
</cffunction>
</cfcomponent>
That ensures that the datasource can be accessed anywhere in the application quite simply as application.appDSN. Otherwise, you will have had to create an application component object first.
Copy link to clipboard
Copied
By following above steps you can create multiple instance in a sever on different ports. I have tried it in developer edtion which is same as enterprise one. coldfusion automatically occupy next port and then later you can make changes. Before purchasing you can test your senario in developer edition.
Copy link to clipboard
Copied
You can have more than one application running on one instance of ColdFusion. You can also have more than one database in play. In fact, you can have more than one database associated with a single ColdFusion application. It all depends on what you are attempting to accomplish.
The associated urls have nothing to do with ColdFusion. This takes place at the webserver level.
Going back to your original post about having a Canadian and American site because you have separate Canadian and American businesses, it's conceivable that the requirments of the two sites will diverge over time. You should take that into account as you decide how to organize your ColdFusion code, images, style sheets, etc.

