Recycling Jetty Http2 Client streams -- best practice? -


we have jetty http2 client constructed example here.

each request processed client calls session.newstream(...). appears old streams not gc-ed. however, can't seem find way, in api, either recycle them, or close them.

should set small idle timeout using streampromise.get().setidletimeout(t)?

should keep stream object, mark when exchange finishes, reuse it? in case though, need recycle listener, makes stateful.

is there way "close" stream object, or mark gc? setting null doesn't seem api-ish.

streams closed are gced.

streams support half closes, in order stream closed need send frame end_stream flag set, , receive frame end_stream flag set.

if use http2client directly, chances you're not ending stream on side (i.e. send frames, forget set end_stream flag on last frame send), or server not end stream (which server bug).

either case, turning on debug logging category org.eclipse.jetty.http2 on client tell whether frames have end_stream flag set, , report when streams removed - need parse possibly large-ish log files.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

angular - Copying node modules to wwwroot AspNetCore -