• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTPUrlConnection and performance.

Claude Moore
Ranch Hand
Posts: 826
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good evening guys,

i need some advice from you. So, I have a pure java client which communicates over LAN (or WAN) serializing and deserializing Java Object with a remote AppServer. Java Object are encapsulated in a class which, basically, encapsulates an HashMap so that I can always specify what procedure I need to call on my remote server.
An artisan way to execute RPC over Http.

Now, all works fine, except some cases where clients get poor performance. I tried to use some open-sourced tools to investigate what's happening under the hood, and thanks to these tools it turned out that TCP packets are very fragmented. I can't find a more proper term to define this: it seems evey request (or response) is turned in small pieces; in a LAN enviroments this behaviour does not occur.

I think that fragmenting packets is basically a normal behaviour (of course, if I have a minimun guaranteeded bandwith, I can't suppose that each request uses all the available connection speed), but detected slowness may not still be explained...

So, do you have any suggestions ? Is there a way to avoid overfragmented communication ?

I thought i could rely on HttpClient provided by Apache. What can you suggest me in this sense ?

Thank you in advance !

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic