Copy link to clipboard
Copied
Is there a document or additional information on the best way to configure multiple instances of CF10 in a production environment? Do most folks install CF10 as a ear/war J2EE deployment under JBoss or Tomcat with Apache as the webserver?
Copy link to clipboard
Copied
There’s no such document that I know of, no.
And here’s a perfect example where “best practices” is such a loaded phrase.
You wonder if “install CF10 as a ear/war J2EE deployment under JBoss or Tomcat with Apache as the webserver”. I’d say the answer to that is “absolutely not”. Most folks do NOT deploy CF as a JEE ear/war. It’s an option, yes. And if you are running A JEE server already, then it does make great sense to deploy CF as an ear/war on said container.
But would it be a recommended practice for someone installing CF10 without interest in JEE deployment? I’d say not likely, unless they already have familiarity with JEE deployment.
Now, could one argue “but there are benefits to deploying CF on a JEE container”? Sure, they could. But would it be a “best practice”? Only in the minds of a small minority I think (those who appreciate the beenfits of native JEE deployment and containers). Of course, CF already deploys on a JEE container (Tomcat in CF10, JRun in CF 6-9), but the Standard and Enterprise Server forms of deployment hide all that detail, which is best for most. With those, we just have a ColdFusion directory and are generally none-the-wiser that it runs on JRun or Tomcat.
That leads then to the crux of your first sentence: you mention multiple instances. That does change things quite a bit.
First, a couple point of clarification before proceeding: in CF 7-9, such “multiple instance” deployment was for most folks enabled using the Enterprise Multiserver form of deployment, and created a Jrun4 directory where instances were installed (as distinguished from the Enterprise Server form I just mentioned above, which hid the JRun guts).
In CF10, though, there is no longer a “multiserver” install option. It’s just that CF10 Enterprise (or Trial or Developer editions) does let you create new instances, using the same Instance Manager in the CF admin that existed for CF Enterprise Multiserver from 7-9. CF10 still only lets you create with the Enterprise (or trial or developer) edition, not Standard.
(There is a change in CF10 about multiple instances, though: note that in CF10, you never see a Tomcat directory, even if you want “multiple instances”. When you create them, they are created right under the CF10 directory, as siblings to the cfusion directory (and while that cfusion directory previously existed only in the CF 7-9 multiserver form of deployment, it does not exist even in CF10 Standard, as the only instance it can use.)
So all that is a lot of info, not any “best practices”, but you asked if there was any “additional info”, and I thought that helpful for you to have as you contemplate your options. (And of course, CF10 Enterprise does still let you deploy as a JEE ear/war if you want.)
But no, doing it would not be a best practices. If someone asked for “the best way to configure multiple instances of CF10 in a production environment”, I’d tell them to just proceed as they would have in CF 7-9, using the same CF Admin Instance Manager capability to create them (and optionally cluster them).
All that said, everything about CF10 does now run on Tomcat instead of JRun, and some things are improved under the covers, like clustering (and related things, like session replication), because those are now Tomcat-based features (which are actively updated and used by the Tomcat community), rather than JRun-based (which were pretty old and hardly used by anyone since JRun was EOL-ed several years ago).
I’ll note that I offer a talk with a lot more detail contrasting CF10 on Tomcat to CF9 and earlier on JRun. That may interest you, snormo, so check out the presentations page at carehart.org.
Hope all that’s helpful.
/charlie
PS You conclude with a mention of Apache as the web server. And sure, if one is on a *nix depoyiment or just favors Apache, it’s a fine option. But someone running CF 10 on Windows should not be discouraged from running on IIS. It’s come a long way and is now very secure, flexible, and capable, whether used for one or multiple instances of CF.
Copy link to clipboard
Copied
Thanks Charlie for your detailed reply.
Perhaps a little additional information would be useful. Currently we are running Enterprise CF8 on RHEL V4, deployed as a war file under Jboss. We are using Apache web server configured with mod_jk, ajp connectors to two separate Jboss/CF instances. We have a production and a staging instance on the same physical machine. This works just fine and has for years, It is a large corporate intranet installation. No outside exposure.
I'm know this same configuration strategy will (or should I'm assuming) work (with upgrades to the OS, httpd, etc) with CF10. I'm just not sure if this is the "best way" and that's what I'm trying to determine. Is the CF10 multi-instance configuration viable in our case. I'm trying to get a handle on this.
So far:
I've installed Enterprise CF10 on RHEL 6.3, a standard server installation, not a ear/war deployment, with Apache as the external web server. For the default cfusion instance CF has added directives to the httpd.conf file that are exactly like our CF8 implimentation. We got worker.properties, etc. So, this is essentially the same method as we are using for CF8. I created a second child/sibling instance through instance manager and it looks to me like it is deployed using the internal web server, not Apache, and for some reason it does not want to start automatically when the system reboots. I have to manually go into instance manger and start the child instance. Any idea about this? I have this same setup on a Windows server and the second instance starts just fine.
Certainly with two instances we can relegate certain applications to their own instance of CF. If the primary cfusion instance behaves badly and needs restarting can that happen without affecting the child? I think the reverse of this is true. I can restart the child without affecting the primary instance? Am I understanding this correctly? In our current CF8, JBoss ear/war deployment they are totally independent and I can restart either one without affecting the other.
Given all that I guess my questions are:
1) Why isn't the child instance starting automatically?
2) Can I restart the primary instance without affecting the child?
2) If I want the child instance to use the Apache web server, not the internal one, I will have to add additional directives to httpd.conf. Then I start to approach the Tomcat J2EE, ear/war method. How is this standard multi-instance installation better than just doing a J2EE Tomcat ear/war deployment other than the Tomcat stuff is all contained within ColdFusion and is under the covers as you put it?
I really appreciate your time and effort and I will certainly check out your web site.
Regards,
Mike Oatsvall
SAS Institute
Copy link to clipboard
Copied
While i dont have answers to the specific questions above, I do have a similar situation. Im wondering the best way to install CF10 given we came from a CF8 multi server install.
Some advantages I can see about the J2EE install
While you can do this with the server install of CF10, its not ideal
..any experiments i have had in the past with CAR deployments have failed. I beleive that feature just does not work properly, at best it works poorly - but thats another issue.
So I would say for ease of deployment of code + configuration the WAR approach is better. I dont understand why adobe moved all the Tomcat default folders around. The should have made it more like JRun - basic J2ee server and then you put a CF instance on top of it. In order to simplify for some, they have made it more complex for others.
Copy link to clipboard
Copied
Hi Mike
Just to answer your questions for the record..
1) Why isn't the child instance starting automatically?
From what I can tell on Linux when you add a new instance to CF10 it does not create an init.d script for it. you need to make your own (CAN SOMEONE TELL ME IF IM WRONG ?)
2) Can I restart the primary instance without affecting the child?
Yes, they are separate instances
2) If I want the child instance to use the Apache web server, not the internal one, I will have to add additional directives to httpd.conf.
Yes
Then I start to approach the Tomcat J2EE, ear/war method.
Yes, you are basicaly making lots of mini tomcats everytime you make a new instance.
How is this standard multi-instance installation better than just doing a J2EE Tomcat ear/war deployment other than the Tomcat stuff is all contained within ColdFusion and is under the covers as you put it?
See my other post. IMO its different with no real added value other than backwards compatablity (if you need it). The good thing is that it puts each instance on its own JVM heap with its own JVM config. in the JRun days every instance was its own heap BUT it had a shared JVM config you had to manually change.
See http://blogs.coldfusion.com/post.cfm/what-s-the-deal-with-tomcat-in-coldfusion-10
There are some functional losses if you do WAR deployment to tomcat like SES URLs and a couple of CGI params, also you have to put everything under the tomcat root for CF to find it.