Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

short answer on server redundancy?

Status
Not open for further replies.

silverspecv

Programmer
Oct 31, 2003
125
US
I have searched for this, but I found too much information.. I was wondering if someone can give me the short simple truth to this without a bazillion if's and options:

I have a single cf server running win2k, cfmx, and mssql.. Now that we're getting more traffic, we want to put in some kind of fault tolerance in case we have to reboot it. What is the cheap/easy way to do this?

After reading, it seems like the way to do it is to split off sql onto its own server and then set up 2 cf servers in a cluster, and they will more or less load balance themselves?
 
you can't use CF to throw a CF error if the administrator is restarting. likewise if the whole server is down you'll get nothing. that means, yes you'll have to use multiple servers, at least 3.

2 cf
and
1 db

keep in mind if the DB goes down you'll have to catch that with cftry and cfcatch. wrap each db call incase it times out.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
by the way, in order to do clustering i believe you need enterprise edition, standard/professional can't do it. I may be wrong but I think that's the case.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
When you set setup clusters (using ClusterCATS, in my case), you set at what % the traffic should be pushed to the 2nd server. We have 2 CF servers, server1 is the main server and server2 is the backup. When server1 got to 90% we sent all users to server2.

Now we ran into major issues with out sites constant;y going down, but that was another issue. You should really push you dB onto its own server, theoritcally your main server should only have the cf sevrer, and IIS. Put your mail server and dB on another server.

In my case, our boss had the IIS, CF Server, mail server, and dB server all on ONE server.

Another troubleshooting tech I impleneted on all my code was use gettickcount() around all query calls to the dB and log them, if/when your site starts crawling you can go to this logfile and see which query is taking so long to process.

You can set that up as:
Code:
[COLOR=red]<cfset gm_startTime = gettickcount()>[/color]
<cfquery name="testQuery" datasource="#ds#">
  select user_id, name, address, city, state, zip
  from users
  where user_id = '#url.user_id#'
</cfquery>
[COLOR=red]<cfset gm_endTime = gettickcount()>
<cfset totalTime = (gm_endTime - gm_startTime)/1000>[/color]
...
...
...
[COLOR=green]
<cfquery name="logrecs" datasource="#ds#">
  insert into LOGFILE(pagecall,starttime,endtime,totaltime,createdate,queryname)
  vales('page1.cfm',#gm_startTime#,#gm_endTime#,#totalTime#,getdate(),'testQuery')
</cfquery>
[/color]


____________________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top