Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

Java - determining host name from IP address

 
Thread Tools Search this Thread
Old 10-02-2003, 08:44 AM   #1
amit
 
Posts: n/a
Default determining host name from IP address

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
  Reply With Quote
Old 10-02-2003, 09:33 AM   #2
Michael Borgwardt
 
Posts: n/a
Default Re: determining host name from IP address

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.


  Reply With Quote
Old 10-02-2003, 06:05 PM   #3
Roedy Green
 
Posts: n/a
Default Re: determining host name from IP address

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.
  Reply With Quote
Old 10-02-2003, 06:06 PM   #4
Roedy Green
 
Posts: n/a
Default Re: determining host name from IP address

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.
  Reply With Quote
Old 10-03-2003, 05:54 AM   #5
Marco Schmidt
 
Posts: n/a
Default Re: determining host name from IP address

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
  Reply With Quote
Old 10-04-2003, 11:49 PM   #6
MK Wong
 
Posts: n/a
Default Re: determining host name from IP address

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

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47