Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2008

Tip: Looking for answers? Try searching our database.

Java.net.SocketInputStream

Thread view: 
Vikram - 10 Apr 2008 11:46 GMT
Hi,
   I am using java.net.SocketInputStream to read the Http response.
For the first read, it takes around 2 minutes, but for the subsequent
reads, it is very fast ( in ms). Where could be the problem ?
Arne Vajhøj - 10 Apr 2008 23:48 GMT
>     I am using java.net.SocketInputStream to read the Http response.
> For the first read, it takes around 2 minutes, but for the subsequent
> reads, it is very fast ( in ms). Where could be the problem ?

Impossible to say.

One possibility would be a very slow nameserver.

Arne
Viks - 11 Apr 2008 06:45 GMT
> >     I am using java.net.SocketInputStream to read the Http response.
> > For the first read, it takes around 2 minutes, but for the subsequent
[quoted text clipped - 5 lines]
>
> Arne

Following can be reasons :

1. DNS resolution time
2. First Byte download time ( origin process time )

In most cases the first responses are heavy and involves connection
setup. The subsequent connections will reuse the connection hence are
faster i.e if your protocol is HTTP/1.1.

Viks


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.