|
-
May 13th, 2008, 11:51 AM
#1
Thread Starter
Fanatic Member
Distance from a server
If i have a list of database server IP's how can I establish which one is the closest?
-
May 13th, 2008, 11:56 AM
#2
Re: Distance from a server
Measuring tape.
Seriously though... I'm not sure there is a way. Physical distance isn't always indicitive of speed... it all depends on traffic and routing.
-tg
-
May 13th, 2008, 12:08 PM
#3
Re: Distance from a server
-
May 13th, 2008, 12:39 PM
#4
Re: Distance from a server
tracert would tell you how many routers there are between you and the server, it wouldnt be a very accurate way to determine which server is the closest at all, but in lack of other methods...
Why do you want to connect to the closest one any way?
-
May 13th, 2008, 12:45 PM
#5
Thread Starter
Fanatic Member
Re: Distance from a server
For my final year project at uni I have to develop a program that can be used to access a database that can either be on a central server or on a number of servers.
So basically the program must be able to use a centralised or distributed database.
With the distributed database there will be some replication of data on the servers that the database is on.
If a server goes down I will need to find the best server to connect to in order to maintain the database connection. I assumed the best server to connect to would be the closest.
-
May 13th, 2008, 01:10 PM
#6
Re: Distance from a server
From what I understand, your definition of the "best" server is whichever you get the quickest connection with - which is not related to distance.
In terms of the network speed, you could Ping each server to see how long it takes for a reply.
That is only half of the issue, as the speed of response from the database system can have a big effect too (that speed will depend on the hardware and configuration etc, as well as the current amount of users/work). One way to test this would be to run a very simple query to return data you know exists (perhaps "SELECT Id FROM TestTable WHERE Id=1"), and see how long it takes.
It is debatable if running both tests is worthwhile, and I would personally just test the database part (as the results depend on the network part too).
-
May 13th, 2008, 02:59 PM
#7
Re: Distance from a server
 Originally Posted by Atheist
tracert would tell you how many routers there are between you and the server, it wouldnt be a very accurate way to determine which server is the closest at all, but in lack of other methods...
Yeah I thought I'd mention it because it can usually get you the city but beyond that...
 Originally Posted by x-ice
For my final year project at uni I have to develop a program that can be used to access a database that can either be on a central server or on a number of servers.
Cool project (my final application was supposed to be a simple game; I made Tic-Tac-Toe ).
Your answer opens up many questions in my mind. Connecting to the centeral database is simple but how does your client know where all of the other databases are when it has to go into a distributed mode?
When it's in a distributed mode, how are you syncing the data? Does each database do something specific or do you have / need a way of data syncing?
I would think that if you just need to connect to one of the distributed databases you would calculate which database has the smallest load and go to that one rather than by latency or geopgrahic distance.
-
May 13th, 2008, 04:18 PM
#8
Re: Distance from a server
 Originally Posted by kasracer
Cool project (my final application was supposed to be a simple game; I made Tic-Tac-Toe  ).
LOL, my last programming class I ever took was programming on Apple IIe's and the final was making a graphical version Connect 4 in AppleBasic or whatever it was called.
I had two player working fine, then I tried to write the logic routine for one-player and ran out of memory with my computation matrices (8k RAM and most was taken up by AppleBasic ).
-
May 19th, 2008, 07:47 AM
#9
Re: Distance from a server
It's a long shot, but this may just be applicable to you.
In an Active Directory (AD) network, servers can be listed within an "Active Directory sites and services" console.
Theoretical connection "links" between servers can be either defined manually, or automatically by AD (in the later, a Windows service named KCC, or the Knowledge Consistency Checker is responsible for creating the links).
Each of these links has an attributed cost value, again which can be defined manually or calculated. A "site link cost" is a numerical representation of the efficiency of connecting from 1 server to another. If you consider a triangle shape, with ServerA at the top and ServerB and ServerC at the other points, ServerA - ServerB may be nice and fast - connected physically by a T3 connection, and therefore have a lower site link cost of 100. If the link between ServerA - ServerC is connected via a 56K link, and it's on an unreliable NTL/Virgin connection, then this can be set to a cost of 500 to tell the Windows servers not to use this if it can be avoided.
That's a simple explanation of that process, and here's some coding which'll let you look at an AD site link cost if it's of help:http://techtasks.com/code/viewbookcode/1771 and to alter this so it fits into .Net, you can look at the System.DirectoryServices namespace...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|