August 22, 2016

Improve HTTP Performance by Increasing HTTP Chunk Size

Increasing HTTP chunk size with -Dweblogic.Chunksize=65500

Some clients, surprisingly, have a performance issue parsing chunked responses. In one of the recent cases, a client code took almost 500ms to parse chunks in a 1Mb JSON response.

OSB (Weblogic, in fact) can decide to send a larger payload in chunks, despite there is usually no benefit in it for internal networks. We cannot disable it as it’s a required option for HTTP 1.1.

What we can do is to increase the size of the chunk from the default 4K, reducing the overhead a client has.

There is a not-too-well documented Weblogic system property named weblogic.Chunksize. It’s maximum permitted value is slightly under 64K:

-Dweblogic.Chunksize=65500

Set it in the managed servers arguments, and most of the chunks will have this large size. (Some chunks will still come small).

The problematic client from the case above, for instance, reduced its parsing time to 150ms from the original 500ms.

A word of caution: this setting affects all OSB and Weblogic communications. Having said that, I cannot imagine a scenario where a smaller chunk size could be beneficial.

Vladimir Dyuzhev, author of GenericParallel

About Me

My name is Vladimir Dyuzhev, and I'm the author of GenericParallel, an OSB proxy service for making parallel calls effortlessly and MockMotor, a powerful mock server.

I'm building SOA enterprise systems for clients large and small for almost 20 years. Most of that time I've been working with BEA (later Oracle) Weblogic platform, including OSB and other SOA systems.

Feel free to contact me if you have a SOA project to design and implement. See my profile on LinkedIn.

I live in Toronto, Ontario, Canada.  canada   Email me at info@genericparallel.com