View Full Version : Synchronization with IIS
javadude2003
07-30-03, 10:58 AM
I run an IIS serer for my ASP sites as of now. But I also purchased a remote host for them too becasue my ISP was capping my bandwidth from my server. So now I have two different locations for all of my webs. I was wondering if there was any way to do the follwing.
1. Is it possible to create a script so that when someone acesses my domain name (for example www.webfusionnet.com) that it can redirect to my server all the time, but when my bandwidth is low or my server is down, it will automattically redirect to my alternate server?
2. Is there a way to keep all the web sites on my IIS server synchronized with all the webs on the remote server I have? In essence, each server is identical, having the same web site information. But I just wanted to know if there is a way to keep all the webs automattically updated on the remote server without having to publish them manually myself?
hmm, not sure about the second question,
but last year i built a kind of load balance script,
which allows you to enter two or three server addresses, and each time some one hits you domain.com it redirects to another server to help split up the load. if you like i can post the code here.
javadude2003
07-31-03, 10:17 AM
Yeah, I would appreciate it if you were to post the code for load balancing. Most of my sites have many ASP and PhP databases as well as much streaming media content, so this code will definitely help. Thanks a lot.
AnonymousReseller
07-31-03, 12:52 PM
Greetings:
The solution to your problem is prety simple and can be utilizing a couple of free resources on the internet.
1st you will need use rsync.exe (http://www.infoscience.co.jp/technical/rsync/original/nt.html) is a great resource with instructions. You will want to have the admin of the server install this as a service and talk him into include a batch file for executing on whatever interval you want the site update with.
rsycn.exe will also need to be running on the 2nd machine you want to transfer your files on. The instruction above are pretty clear on the setup and Admin access is required.
Optionally you could manually use FTP to update both sites if the above is too complicated.
2nd you can utilize www.zoneedit.com to host your DNS, check out the Failover & Load Balancing features. This should give you the control you need to have 2 sites with a nice and low cost load balancing feature in place.
If by chance you are utilizing any advance database stuff (not including Access) you are into a new realm and a differant game plan should be sought.
Have a Super Day,
Aaron Phililps
ap@anonymousreseller.com
javadude2003
07-31-03, 05:00 PM
Thanks for the help anonymous, however, I do advanced database compiling using SQL server and Php/MySQL. I did look into your solutions, which would require me to install the binaries on the remote server. Unfortunately, I don't have total control over it, and I do not know if I could install it. But I will take the program u suggested into consideration as a last alternative. Thanks again.
javadude2003
08-07-03, 11:24 PM
hey angst, do u have that load balance script that u could post here, thanks.
hey, sorry my server was off line for a few days to i didn't have access to the script,,
but here it is:
<%
dim server1, server2, server3, port1, port2, port3
server1 = "http://www2.domain.net"
port1 = "9050"
server2 = "http://www3.domain.net"
port2 = "9050"
server3 = "http://www.domain.net"
port3 = "8050"
'/// End Config here///
%>
<%
Function Shuffle( inArray, needed )
incnt = UBound( inArray )
dim outArray
redim outArray( needed )
For i = 1 To needed
choose = Int( incnt * Rnd(1) ) + 1
outArray( i ) = inArray( choose )
inArray( choose ) = inArray( incnt )
incnt = incnt - 1
Next
Shuffle = outArray
End Function
Function ShuffleDeck( deckSize )
Dim i, deck()
ReDim deck( deckSize )
For i = 1 To deckSize
deck(i) = i
Next
ShuffleDeck = Shuffle( deck, deckSize )
End Function
%>
<%
Randomize
ar = Array(0," <a href= " & server1 & ":" & port1 & "/listen.pls>" & server1 & ":" & port1 & "</a> "," <a href= " & server2 & ":" & port2 & "/listen.pls>" & server2 & ":" & port2 & "</a> "," <a href= " & server3 & ":" & port3 & "/listen.pls>" & server3 & ":" & port3 & "</a> ")
str = Mid( Join(ar," "), 2 )
sh = Shuffle( ar, 1 )
For i = 1 to 1
servers = sh(i) & vbNewLine
Next
%>
<br><Br><Br>
<%=servers%>
you'll have to altre it for your needs,, i was using it was a load balancing script for shoutcast radio servers before.
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.