At 1/6/02 10:11 PM, George Kirikos wrote: >If on you're local server you're able to do a DNS lookup for the >abc.com/net/org (e.g. via ping, dig or another tool -- I'm not a DNS >wizard), and find that a host such as www.abc.com exists, you don't >need to query OpenSRS as it is definitely unavailable. Assuming local >lookups via your local DNS server is faster than querying OpenSRS, >you've just saved some time.
I did some experiments with this a while back. My lookup scripts first do a normal lookup on the requested domain, and if that's taken, try up to nine other variations, stopping once they find five available ones. I thought perhaps I could speed up the "lookup nine other ones" using DNS lookups. So before doing an OpenSRS lookup on each, I ran a "dig example.com ns" and only did the actual OpenSRS lookup if the dig result contained "ANSWER: 0" (this is a slightly simplified explanation). I found the average time required to perform a lookup of a TAKEN name dropped by a factor of about ten (dropping from 1.5 seconds to 150 ms). That's good. However, I also found that since I keep trying many variations until I've found up to five of nine that are available, there would usually be at least three versions -- and often many more -- of the name that were probably available according to the DNS. So in the end, I would often end up performing five OpenSRS lookups no matter what, so the total time taken wasn't any better for these names where a number of variations were available (in fact, it was potentially worse if there was a DNS problem that caused dig to take more than a few milliseconds). It was much faster if someone tried looking up "netscape" or something (the dig lookups would determine very quickly that all variations were taken, without needing to do any OpenSRS lookups), but those aren't the majority. So I didn't put it into production. One possibility I considered but haven't tried is to perform only the dig lookups for the nine variations, and not the OpenSRS lookup, and to display them as "PROBABLY available" on the order screen, checking them properly only if the person attempts to order them. I don't know if the lack of accuracy is bad enough to cause problems and strife. A more complicated option is to multiplex the OpenSRS lookups by forking the OpenSRS client and communicating the results between the processes. I decided to wait until I switched to the SF version before embarking on anything that dramatic (but I'll share it with the list if I do). -- Robert L Mathews, Tiger Technologies
