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!

Distributing a Video based on client IP address?

Status
Not open for further replies.

maverik59

Programmer
Oct 30, 2002
67
GB
Hi, I have a video on 3 different servers. Is it possible for users from different locations to click on one link and it redirects them to the nearest server. - There is only one link saying "click here" (NOT seperate links based on location.) I don't know where to start. Any help much appreciated.
 
Most implementations I've seen (downloading large software packages, for example) use the "choose a location that's closest to you" solution (provide three links).

Since there isn't anything intrinsic in the IP that denotes geographic locale, you'd probably need to grab the IP (#CGI.Remote_Addr#) then do some sort of WHOIS lookup using CFHTTP or one of the Custom Tags, figure out the location, map it to a look-up table... gosh... sounds entirely too complex to me for a simple video.

There might be something you could do if you could figure out how to PING (I believe there are a couple CFX tags that'll do that for you), and based on the number of hops and response times, choose an appropriate server. Doesn't sound particularly reliable, though.

I know IIS has some distributed content thingamajiggy (I forget what they call it, but that's the technical name) built-in that will sync remote directories to a master and at least FTP from the closest server (not sure about HTTP requests or other streaming). Hope it helps,
-Carl
 
The Internet makes Routing Desicions based on alot Factors. Mainly your routing protocol in use which varies depending how the Admin configured his router. Distance should not matter. Bandwith matters. The only time you will notice Geographical Differences is if your server is overseas. I would look into doing a request to see What the latency(ping) is on the server before directing someone to it. But your ping will be different from thiers so that really doesn't help. The only real thing to check is Bandwith:

What type of internet connection is the server on.
Is there a throttle on the Server.

Standard Internet Back Bones (US) (Bell Connections)
At least a T-1 (DS1) 1.544 Mbps (Full Speed) Equal to about 192 KB per second if you were to download a File in IE
"T-2" (DS2)"Can't remember)
T-3 (DS3)45 Mbps 5600 KB per Second or 5.6 Megabytes a second. Max Speed
Then you have your
OC connections which are Fibre Optical Lines
 
The Internet makes Routing Desicions based on alot Factors. Mainly your routing protocol in use which varies depending how the Admin configured his router. Distance should not matter. Bandwith matters. The only time you will notice Geographical Differences is if your server is overseas. I would look into doing a request to see What the latency(ping) is on the server before directing someone to it. But your ping will be different from thiers so that really doesn't help. The only real thing to check is Bandwith:

What type of internet connection is the server on.
Is there a throttle on the Server. Limiting you download speed.

What is the user load your sending to it.


Standard Internet Back Bones (US) (Bell Connections)
At least a T-1 (DS1) 1.544 Mbps (Full Speed) Equal to about 192 KB per second if you were to download a File in IE
"T-2" (DS2)"Can't remember)
T-3 (DS3)45 Mbps 5600 KB per Second or 5.6 Megabytes a second. Max Speed
Then you have your
OC connections which are Fibre Optical Lines
 
The most reliable way to do this would be to use a select box that allows the user to choose their country, then decide what server is the best one to server the file from.

Otherwise, you could use a complicated routine to check various items on the users machine, time zone, browser country setting, ip or hostname etc etc.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top