Dec 11 2009

Creating A Good Redundant 64-bit Install Of ColdFusion

Posted by Mike Brunt at 7:10 AM Web Servers | ColdFusion | JRun-J2EE

We recently had a client for some advice on setting up a redundant installation of ColdFusion and SQL Server, here is what we answered to 14 key questions, our answers are surrounded by # #.  Firstly, the client lead in surrounded by " ".

"We’re currently on a single application server with CF8 and a single database server with MS SQL Server 2000. OS for both is 32-bit Windows Server 2003. We use SeeFusion as our monitoring tool (we have CF8 Standard edition).  We’re looking to move to an environment with 2 x application servers load balanced with CF8 Standard and 2 x database servers with MS SQL Server 2008 (either in Replication or Clustered). The code will be on a RAID-5 SAN shared by the application servers. OS for all servers will be 64-bit Windows Server 2003 or 2008. I believe we will be continuing with SeeFusion as our monitoring tool."

Q-1) Clustering CF? - If we have this set up with 2 application servers should we cluster CF or is it OK to leave them separated Can we use cluster 2 servers with CF8 Standard or will we require Enterprise edition?

A-1) #Considering that you are going to 64 bit and that you need CF Enterprise to cluster at the CF level I would not cluster CF. The main reason for doing so, is that on 32-bit systems we have an effective 1.4GB at max ceiling for the JVM so multiple instances with clustering allows us to have N Instances x 1.4GB, as you are moving to 64-bit the 1.4GB at max ceiling is no longer an issue.  However with two web-CF servers you will need to cluster at least at the web server level which you can do with Windows NLB or at the overall server level with a hardware clustering device.#

Q-2) We use SESSION scope variable A LOT so we will need to use "sticky sessions" or "session replication". Is one better than the other?

A-2) #If you take my advice and do not cluster CF, session replication is not available and to be honest, I have found it somewhat unreliable.  Definitely enable "round-robin with sticky sessions" in your clustering mechanism, it is the most effective and reliable clustering algorithm in our experience.#

Q-3) Will we encounter any problems if we leave the 2 x CF servers un-clustered?

A-3) #You will need to cluster them somehow as I mention above, either via NLB or a hardware clustering device#

Q-4) If we don’t cluster CF and go with the set up of 2 separate instances of ColdFusion CF Gotcha’s?

A-4) #My only thought here, which is not a gotcha as such, is that Client Variables are easier to deal with when clustering as they are always available to all users, however complex variables (structures etc) cannot be easily manipulated in the Client scope.#

Q-5) Are there any specific tags or features of our CF Application that we should be wary of when moving to a multiple CF server environment?

A-5) #As long as both CF servers are identical, no not that I can think of#

Q-6) We use SESSION variables A LOT  but the load balancing uses sticky sessions so I’m hoping this will all be fine.

A-6) #Yes I mentioned this above, enable "round-robin with sticky sessions"#

Q-7) The system quite often has to convert resumes and other uploaded documents to PDF format, we use CFEXECUTE and JAVA classes to invoke the 3rd party PDF conversion tools. These tools are used quite a bit. [CFPDF doesn’t do what  we need in CF8, I think CF9 will help us eliminate some of these 3rd party tools]

A-7) #I am always in favor of using native tools etc.  In all of this it is imperative, in my opinion, that you thoroughly test everything before deploying to production.#

Q-8) CF Scheduled Tasks With 2 instances of ColdFusion we’ll have 2 instances of CF Admin. Which server should we set up the ColdFusion Scheduled Tasks and what happens if that server dies? For the tasks that are run at certain intervals all day we can have them set up on both servers with them running at staggered intervals so if one server fails the other will catch it the next time around. However, with tasks that should only be run once a day there is the potential for them to not run if the server is down at the time or twice if they are set up on both servers. 

A-8) #I would keep this as simple as possible, set up the tasks on both servers but only activate one, leaving the tasks on the other ready to run but NOT running (active-passive) if the active server fails you can activate the Scheduled Tasks on the second server.#

Q 9) Do you have a recommended method for setting up Scheduled Tasks?

A-9) #This is one area where CF Enterprise with multiple instances can be really helpful as you can dedicate one instance to running the Scheduled Tasks which means that heavy processes will not impact the main web sites.#

Q-10) CF Locking - If CFLOCK is performed around a database call on Server 1 and then the same CFLOCK is made on Server 2 the 2nd CFLOCK will probably be granted and allowed to modify the database at the same time as server 1. Each server won’t know about the locks on the other server. I can see this could  potentially cause a few issues. Is there a way to avoid this? Does the locking need to be done at the database level?

A-10) #Absolutely at the database level, I never advocate the use of CFLOCK with database transactions, for instance if shared scope variables are used in SQL statements etc, always localize the variables first. Further to this I am a firm believer in using Stored Procedures for database interactivity.#

Q-11) CF Settings Are there any CF settings we should tweak when moving to a multiple CF server environment?

A-11) #Not that I can think of but it is important to keep the settings the same, with the exception of Scheduled Tasks, as mentioned above.#

Q-12) Database Replication or Clustered?

A-12) #With SQL Server 2005-2008 STD there is a wonderful way to create a redundant data tier with mirroring and a witness server where you only require one SQL Server license, we have done this many times to good effect, it is a hefty subject to detail here but we could certainly help you with that.#

Q-13) The shortlist of hosting companies differ in their database server configuration. One company recommends Replication while the other recommends Clustered. My manager is leaning towards the Replication method.

A-13) #Very few companies know about mirroring and a witness server in SQL Server, I would ask your vendors about that and yes this would involve replication.#

Q-14) Do you recommend a certain method (or strongly recommend not going with a certain method) ?

A-14) #I am a big advocate of mirroring and a witness server in SQL Server.#

#One last important point, in 64-bit systems you should ideally have a minimum of 16GB Ram on the CF-web servers and ideally 32GB on the database servers.#

 

Comments

Claude

Claude wrote on 12/11/09 10:02 PM

In your answer, A-1, it's unclear to me how the 1.4GB ceiling is lifted by using software clustering with multiple instances. Isn't the JVM limited to 1.4GB, and each instance is managed by the container within that memory limit?

Would you expand on A-14 a bit more. Why is 16GB ideal for a 64-bit system?

*I run the enterprise version on RedHat Linux.

Thanks,
Claude
Mike Brunt

Mike Brunt wrote on 12/12/09 7:17 AM

@Claude, firstly I don't think I emphasized this here, most of what I am saying regarding the heap and RAM relates to the Enterprise version of CF and the ability to run multiple instances as it pertains to 32-bit. In that case either multiple jvm{instance}.config files, where instance is an instance name or multiple jvm's can each address up to 1.4GB of the RAM as heap space per instance.

With 64-bit you could assign even more than 16GB to a single instance so 64-bit pertains to the standard version too but only for CF9. We have found 4-6GB per instance to be a good number in practice so at 16GB we are once again more meaning the Enterprise multiple instance version. I hope this clarifies issues a little.
Claude

Claude wrote on 12/12/09 6:41 PM

Thanks Mike, that clarifies it.
Pat Branley

Pat Branley wrote on 12/13/09 3:09 PM

Hi Mike

Would love to see a post on exactly how you set up the witness server etc. with SQL2005-2008

from what i have read you do something to the connection string in the DSN to give it two server IPs ? and then the ColdFusion knows how to get to the fail over server if the main one dies ?

Do you need 2 instances of SQL server or 3 ?


The point i would make about clustering CF is that allows you to cycle instances without taking the site offline which is another advantage apart from the memory advantage you get in 32-bit mode. the ws connector will fail over to the other instances for you so you dont have any downtime if an instance crashes or you re-start it.
Mike Brunt

Mike Brunt wrote on 12/16/09 5:59 AM

@Pat, thanks for your comment the actual detailed process would take many blog posts, however I did put an overview of the process here...

http://www.cfwhisperer.com/post.cfm/setting-up-mirroring-on-sql-server-2008

hth.
Coach bags

Coach bags wrote on 06/21/10 8:50 PM

The farmer to kill the rooster is http://www.coachoutletmalls.com Coach factory outlet , then grabbed the hen to cock says: do not let you down when guangaoer! Rooster: do you think that I shaya his http://www.coachoutletmalls.com Coach bags mother, I continue her into a widow.
credentials

credentials wrote on 10/20/10 9:29 PM

useful to anyone who is interested in creating a good redundant 64-bit Install of ColdFusion!! It is helpful because it has detailed answers for 14 questions related to the subject and all doubts regarding anything here can be clarified by reading this!! In the end we are given as to the GB RAM required for the different CF-web servers and for the database servers!!
john

john wrote on 10/27/10 8:20 PM

sasa sas sasa sasaaaaa sasa sasas
research paper

research paper wrote on 10/27/10 8:26 PM

"Q-11) CF Settings Are there any CF settings we should tweak when moving to a multiple CF server environment?

A-11) #Not that I can think of but it is important to keep the settings the same, with the exception of Scheduled Tasks, as mentioned above.#

Q-12) Database Replication or Clustered?

A-12) #With SQL Server 2005-2008 STD there is a wonderful way to create a redundant data tier with mirroring and a witness server where you only require one SQL Server license, we have done this many times to good effect, it is a hefty subject to detail here but we could certainly help you with that.#

Q-13) The shortlist of hosting companies differ in their database server configuration. One company recommends Replication while the other recommends Clustered. My manager is leaning towards the Replication method.

A-13) #Very few companies know about mirroring and a witness server in SQL Server, I would ask your vendors about that and yes this would involve replication.#

Q-14) Do you recommend a certain method (or strongly recommend not going with a certain method) ?

A-14) #I am a big advocate of mirroring and a witness server in SQL Server.#

#One last important point, in 64-bit systems you should ideally have a minimum of 16GB Ram on the CF-web servers and ideally 32GB on the database servers."

I love questions number 11 to 14 and how you answered them. You really know your stuff, Mr. Brunt. Kudos to your genius. And I am sure you light a few blunts whenever you code and program. You have that look.
writing an essays

writing an essays wrote on 10/27/10 8:27 PM

"Q-11) CF Settings Are there any CF settings we should tweak when moving to a multiple CF server environment?

A-11) #Not that I can think of but it is important to keep the settings the same, with the exception of Scheduled Tasks, as mentioned above.#

Q-12) Database Replication or Clustered?

A-12) #With SQL Server 2005-2008 STD there is a wonderful way to create a redundant data tier with mirroring and a witness server where you only require one SQL Server license, we have done this many times to good effect, it is a hefty subject to detail here but we could certainly help you with that.#

Q-13) The shortlist of hosting companies differ in their database server configuration. One company recommends Replication while the other recommends Clustered. My manager is leaning towards the Replication method.

A-13) #Very few companies know about mirroring and a witness server in SQL Server, I would ask your vendors about that and yes this would involve replication.#

Q-14) Do you recommend a certain method (or strongly recommend not going with a certain method) ?

A-14) #I am a big advocate of mirroring and a witness server in SQL Server.#

#One last important point, in 64-bit systems you should ideally have a minimum of 16GB Ram on the CF-web servers and ideally 32GB on the database servers."

I love questions number 11 to 14 and how you answered them. You really know your stuff, Mr. Brunt. Kudos to your genius. And I am sure you light a few blunts whenever you code and program. You have that look.
Custom flag

Custom flag wrote on 07/12/11 3:02 AM

ohh man this is awesome post.i think they should usebanner to get more flow in look.
you know this is great working by the writer.The writer has done a great job in speniding his time in
research about this article. can i subscribe all his posts ?
I am really happy to read this. i was searching this from last two months and atlast i got it. hurrah..!!
superdry uk

superdry uk wrote on 11/18/11 6:13 PM

Every superdry sale fans convinced superdry will be next huge designer. The colors of superdry uk are just amazing because they are universally flattering! It is a great alternative for people who are tired of buying out the entire superdry outlet line and are finished shopping at Our Superdry uk sale store.
Jose

Jose wrote on 05/23/12 8:10 AM

Mike,

Do you see any value in creating a cluster of multiple CF servers in one physical Windows 2008 64-bit server? I was thinking of setting up 3-4 instances and adding them to one cluster. We can't afford more than one box to be able to do HLD, etc.

Thanks,
Jose
Anthony

Anthony wrote on 06/27/13 12:05 AM

Your blog article is very interesting and fantastic, at the same time the blog theme is unique and perfect, great job. To your success. One of the more impressive blogs I’ve seen. Thanks so much for keeping the internet classy for a change.
<a href="http://www.superfoodz.nl/">Anthony</a>;
legitimate essay sites

legitimate essay sites wrote on 06/27/13 4:47 AM

Our trustworthy paper writing service provides essay help in Australia to save students' time by providing them with original custom essays in Australia.
<a href="http://www.topessaysites.org/">legitimate essay sites</a>
online proof reading

online proof reading wrote on 06/27/13 8:35 AM

Professors and tutors think they give enough time for thesis writing, dissertation writing, or conducting research.<a href="http://www.proof-editing.com/online_editing/">online proof reading</a>
Create a new life

Create a new life wrote on 06/28/13 11:40 PM

there is a wonderful way to create a redundant data tier with mirroring and a witness server where you only require one SQL Server license, we have done this many times to good effect, it is a hefty subject to detail here but we could certainly help you with that.
<a href="http://youtu.be/kcqdJvzdxZc">Create a new life</a>
flapper costumes

flapper costumes wrote on 06/30/13 12:19 AM

Your blog article is very interesting and fantastic, at the same time the blog theme is unique and perfect, great job. To your success. One of the more impressive blogs I’ve seen. Thanks so much for keeping the internet classy for a change. <a href="http://www.funwirks.com/Products/Decade-20s.aspx">flapper costumes</a>
custom essay

custom essay wrote on 09/28/13 2:48 AM

I am really enjoying reading your well written articles.:)
vagz

vagz wrote on 11/20/13 3:19 AM

Hello,It look good,appreciate the research you put into this.
http://www.chaussurefootballpaschere.com
http://www.nouveaufootball.com
cristiano ronaldo mercurial

cristiano ronaldo mercurial wrote on 11/20/13 9:57 AM

i will keep reading.Please continue to write more good blog Thank you.
f50 chaussure de foot

f50 chaussure de foot wrote on 11/20/13 10:13 AM

Great article. I’ve been recently meditating on the identical point myself recently.
sparxx rx

sparxx rx wrote on 10/16/14 8:58 AM

Our enticing garments are made from top-quality fabric that is guaranteed to last. Add spark to the bedroom with our bra and skirt sets available in a variety of colors.
clothing manufacturer

clothing manufacturer wrote on 07/04/15 4:20 AM

Mike,

Do you see any value in creating a cluster of multiple CF servers in one physical Windows 2008 64-bit server? I was thinking of setting up 3-4 instances and adding them to one cluster. We can't afford more than one box to be able to do HLD, etc.

Thanks,
Jose
digitekprinting.com/digital-printing

digitekprinting.com/digital-printing wrote on 11/13/15 6:59 AM

One of the best guide that I have learn much,
Postpartum underwear

Postpartum underwear wrote on 02/27/16 12:39 AM

carercn Exercise may also give you some Postpartum underwear relief from backache.
It can help with sleep problems, too, as long as you don't exercise too close to bedtime.
Carnrn,keep step go with incontinence underwear carercn
include pregnancy and childbirth,Postpartum underwear health conditions such as diabetes and obesity,
and changes that accompany aging.
BuibeBlidslum

BuibeBlidslum wrote on 08/28/16 6:14 PM

Dried-out skin and oily skin, need absolutely many skin care strategies. <a href=http://www.cheapchinajerseyswholesalenfl.com/>Cheap NFL Jerseys</a>.It starts with you.When a breach of interdiction, the PC finds itself a problem, and should thus be unfair, this factor is not visible as an assistant to help.If you guide them right, their confidence in themselves, in their abilities to perform at a certain task and their belief in you will intensify and they'll start on their your own momHow To Make Money In Beachbody CoachOctober 18,<a href=http://www.cheapchinajerseyswholesalenfl.com/>Cheap China Jerseys</a>, 2014 | Author: Ricardo Interpermian | Posted in MarketingBeachBody success seekers: Want to dominate and build a HUGE business?If you seek to become a top earner, you must go well beyond your circle of friends and family.6. Currently undergoing a massiverenovation,<a href=http://www.cheapchinajerseyswholesalenfl.com/>Cheap Jerseys Free Shipping</a>, it will re-open in 2007. The working class, the blue ventilators of collar in first half of the 20th century tended to support one of the two national teams of league. Success seems to happen easily.When you are in the cold, it is likewise creative to put on mitts to secure the skin. In this way, the name of an expert in business development role-playing aspect, rather than basically stringing together the difficulties, the sequence of events activities with the hero, getting some wonderful things, and the villain “naturel is exposed.<br>Visit my sitehttp://www.cheapchinajerseyswholesalenfl.com/