Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 29th, 2003, 08:30 PM
mttatkns mttatkns is offline
Got source?
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Mar 2003
Location: Laguna Niguel, California, USA
Posts: 2,332 mttatkns User rank is Private First Class (20 - 50 Reputation Level)mttatkns User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Redirect by Availability

Is there a way to redirect visitors to a site to different servers based upon whether or not those servers are up? In other words, I'd like for this to happen:

1) Visitor goes to www.mydomain.com
2) They are directed to server1.mydomain.com if that server is up
3) They are directed to server2.mydomain.com if server1.mydomain.com is down.

I'm sure there is a way to do this in PHP or Perl but I'm unsure how to go about accomplishing this goal. Any ideas?

Reply With Quote
  #2  
Old March 31st, 2003, 12:42 AM
dotcomguy dotcomguy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: #devshed @ irc2.beyondirc.net
Posts: 231 dotcomguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 40 sec
Reputation Power: 6
Send a message via ICQ to dotcomguy Send a message via AIM to dotcomguy Send a message via Yahoo to dotcomguy
What you could do is have a test page on each server that you know what the content should be. Use a script as the default page on mydomain.com. This script will get the test page from server1.mydomain.com. If it gets the expected content back, redirect to that server. Otherwise, redirect to server1.mydomain.com.

For example, in Perl you could use LWP::Simple to get the web page and test to see if you actually are able to get that web page.
__________________
.

Reply With Quote
  #3  
Old March 31st, 2003, 11:52 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,587 Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 21 h 21 m 5 sec
Reputation Power: 997
It's called load balancing. You can either purchase a hardware load balancer or use your OS to do it for you. For more info on how to load balance using your favourite OS, google for "load balancing <name_of_your_os>"

Hope this helps.

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsOtherDev Shed Lounge > Redirect by Availability


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT