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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PING Frequency

Status
Not open for further replies.

Carlitos71

IS-IT--Management
Jan 12, 2004
60
0
0
US
One of our developers is writing a package that accesses either a local database or remote database based on internet connectivity. The way it is determined is by a single ping which is initiated every half-second. So, I have two questions:
1. is a single ping an effective way to determine connection
2. is the frequency of pings enough to slow a network down

Thanks in advance for the help.

Carl.
 
I would be more interested to know if the database is used for lookups only or if updates are required.

Based on the Ping frequency, which seems excessive, I'm guessing updates to the DB are occurring and the developer is concerned about the persistance of the internet connection. If that's the case, there are other issues to address in the application.

Many firewalls will interpret excessive Pings coming from the same source as a Denial of Service attack and drop the remote connection.

 
The connection to the database is updated whith changes rather frequently. Based on that the program will either update the local database if the connection is down and then update the remote database once a connection is reestablished.

Based on that principle what would be an "acceptable" rate to ping? Or is there a better way of verifying connection?
 
If the connection is detected to be "down", how/when are the local DB updates reflected back to the remote (master, I presume) DB?

I guess I would approach it that if updates are required at the remote DB, then either:
[ul]
[li]Assume the connection is always up and incorporate error handling to verify the update. If the update fails, then write to a local copy for later remote updating.[/li]
[li]Assume the connection is always down and work locally, queing remote updates into a batch update process.[/li]
[/ul]
 
Keep in mind that most firewalls have the ability to disable replies to pings, and many security people will recommend it (replies to pings) be disabled.

I think excessive pings might trigger some intrusion detection software. Not sure. YMMV

You don't mention how often the database is updated ("frequently" isn't descriptive enough). If you MUST use this method, why not just check when you need to update? Also, I'd recommend attempting to make a connection to the db itself. If successful, make the update. If not, you know there's an issue. Using a ping is just adding another step that's not likely needed.

Pat Richard, MCSE(2) MCSA:Messaging, CNA(2)
Want to know how email works? Read for yourself -
 
The updates happen with each transaction. The application is used for selling items. Each time an item is added to an invoice the selling on hand changes, as well as, the customer's available balance. So, based on a "regular" day the updates might happen as frequently as up to 10 times per minute.

dkediger - in a down connection the local updates the main db at the time the connection is restored. How this is accomplished right now, I am not sure, I am only aware of what he is trying to implement, which is the frequent ping.

 
With a potential for up to 10 updates per minute/1 per 6 seconds, I'm guessing to address your original question that there's a fair number of remote workstations hitting the main location.

That is a bunch of ping traffic to respond to, and pointlessly so.

As mentioned by both Pat and myself, programming practices dictate opening and closing the DB connection only as needed, so the error code returned by that operation can be used to indicate the presence of the connection.

Are the internet connections sketchy enough to introduce the desire to test for their presence? Perhaps some investment along those lines would be needed as well if that's the case.
 
The idea came about as a part of a "triple check" for updating.

By reading all of the comments, I would definately have to agree that instituting a ping as part of that check would be both unnecessary and highly indicative of a DOS attack by most reliable firewalls.

Thanks for your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top