This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

HTTPUrlConnection and performance.

Posts: 1304
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !

Trust God, but always tether your camel... to this tiny ad.
SKIP - a book about connecting industrious people with elderly land owners
    Bookmark Topic Watch Topic
  • New Topic