![]() |
|
|
|||||||
![]() |
Java - determining host name from IP address |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Posts: n/a
|
I have a peculiar situation. We get a lot of traffic on our
server..almost 2-3 people every second. We are getting the remote IP address using remote_addr function but, donot get the remote host using remote_host. It still just gives the IP address. How do i find out the remote host name?. I am fearing if I implement a reverse look up on my server, it will go down due to excess load as every iP will need to be checked in the DNS for the host name. any suggestions on how this can be done? Amit |
|
|
|
#2 |
|
Posts: n/a
|
amit wrote:
> I have a peculiar situation. We get a lot of traffic on our > server..almost 2-3 people every second. That's very little traffic, actually, at least as far as server resources are concerned. > We are getting the remote IP > address using remote_addr function but, donot get the remote host > using remote_host. It still just gives the IP address. How do i find > out the remote host name?. I am fearing if I implement a reverse look > up on my server, it will go down due to excess load as every iP will > need to be checked in the DNS for the host name. Um... that's *the only* way to get the source host name, the CGI remote_host functionality just hides it from you. It's probably disabled in your webserver, exactly because of performance reasons. Actually, it puts extremely little strain on the server but affects response times negatively. BTW, in many cases there *is no* remote host name at all, it's not required for every IP address to have a host name assigned to it; in fact, this is the case most of the time for end users. |
|
|
|
#3 |
|
Posts: n/a
|
On 2 Oct 2003 01:44:57 -0700, (amit) wrote or quoted
: >I am fearing if I implement a reverse look >up on my server, it will go down due to excess load as every iP will >need to be checked in the DNS for the host name. any suggestions on >how this can be done? Either cache the results or make sure you get are reverse lookup with big cache. -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. |
|
|
|
#4 |
|
Posts: n/a
|
On 2 Oct 2003 01:44:57 -0700, (amit) wrote or quoted
: >it will go down due to excess load as every iP will >need to be checked in the DNS for the host name. any suggestions on >how this can be done? > Perhaps you can check this later with batch processing. -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. |
|
|
|
#5 |
|
Posts: n/a
|
amit:
>I have a peculiar situation. We get a lot of traffic on our >server..almost 2-3 people every second. We are getting the remote IP >address using remote_addr function but, donot get the remote host >using remote_host. It still just gives the IP address. How do i find >out the remote host name?. I am fearing if I implement a reverse look >up on my server, it will go down due to excess load as every iP will >need to be checked in the DNS for the host name. any suggestions on >how this can be done? In case you want to retrieve the geographical location of your visitors, there are commercial services which are probably better suited, e.g. <http://www.maxmind.com/>, <http://www.infosplit.com/>, <http://jan.kneschke.de/projects/localizer/> (Germany / Austria / Switzerland only). They sell databases of (IP range / country / region / city) records so lookups are fast because they are local. I'm not affiliated with any of the above linked companies. Regards, Marco -- Please reply in the newsgroup, not by email! Java programming tips: http://jiu.sourceforge.net/javatips.html Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html |
|
|
|
#6 |
|
Posts: n/a
|
You are missing another important vendor.
http://www.ip2location.com Marco Schmidt <> wrote in message news:<>. .. > amit: > > >I have a peculiar situation. We get a lot of traffic on our > >server..almost 2-3 people every second. We are getting the remote IP > >address using remote_addr function but, donot get the remote host > >using remote_host. It still just gives the IP address. How do i find > >out the remote host name?. I am fearing if I implement a reverse look > >up on my server, it will go down due to excess load as every iP will > >need to be checked in the DNS for the host name. any suggestions on > >how this can be done? > > In case you want to retrieve the geographical location of your > visitors, there are commercial services which are probably better > suited, e.g. <http://www.maxmind.com/>, <http://www.infosplit.com/>, > <http://jan.kneschke.de/projects/localizer/> (Germany / Austria / > Switzerland only). They sell databases of (IP range / country / region > / city) records so lookups are fast because they are local. > > I'm not affiliated with any of the above linked companies. > > Regards, > Marco |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Site to Site VPN MTU issue? | chary | Hardware | 0 | 08-27-2008 01:05 AM |
| Cisco 2621 xm router has high cpu usage | Seby | Hardware | 1 | 01-16-2008 04:31 AM |
| Cisco VPN Restrict Access by IP ? | samirise | Hardware | 1 | 12-16-2007 02:17 PM |
| This is incredible! | jc_ice | DVD Video | 1 | 08-13-2006 09:47 AM |
| Address Bus and External Data Bus Confusion | LoXodonte | A+ Certification | 1 | 04-18-2006 09:09 PM |