Sunday, October 5, 2025
HomeGolangX/web/http: http shopper with customized TLS Config and ForceAttemptHTTP2 set to true...

X/web/http: http shopper with customized TLS Config and ForceAttemptHTTP2 set to true resulting in reminiscence points – Getting Assist


In my golang utility we have been utilizing the http Shopper with customized TLS config, and as per the golang’s x/web/http bundle if we offer a customized TLS Config then the help for http/2 shall be disabled. So for enabling the http/2 help with customized TLS config I enabled the flag ForceAttemptHTTP2 flag, however with that I’m seeing a 200MB of reminiscence spike in my utility.

I’m operating this utility on a 800 Hosts setup. However as of now not one of the Hosts has a http/2 help enabled nonetheless I’m seeing this reminiscence spike.

Did the profiling of my utility utilizing the pprof, including profiling particulars in thread.

Any concepts on why this excessive reminiscence utilization is going on?
Since I enabled the http/2 help, after the protocol negotiation since I didn’t had any hosts supporting http/2 the request ought to fallback to http/1.1 and utility ought to behave usually.
Although requests have been falling again to http/1.1 however there was 250MB extra reminiscence utilization by the appliance.

1.1. Profile With customized TLS Modifications and ForceAttemptHTTP2 as true:

1.2. Profile With customized TLS Modifications and ForceAttemptHTTP2 as true:

1.3. Profile With customized TLS Modifications and ForceAttemptHTTP2 as true:

2.1. Profile with out adjustments:

2.2 Profile with out adjustments:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments