Quantcast
Channel: Questions in topic: "webrequest"
Viewing all articles
Browse latest Browse all 387

How to avoid reestablishing an HTTPS request, use Connection: Keep-Alive or reuse WWW object?

$
0
0
Hi I have an application which uses HTTPS to communicate with an API. Establishing the initial handshake and connection is killing our performance. When profiling with Apache's ab tool the time it takes to establish a new connection to my web serve ranges anywhere from 250ms-400ms. This is consistent with our customers experience with our app, they complain its slow. When using `keep-alive` and profiling the initial connection is anywhere from 250ms-400ms, but all subsequent connections are, as expected, close-to-or 0ms. I can find 0 documentation on how if Unity will respect the `Connection: keep-alive` header, which I am not hopeful of given it disposes of a WWW connection). Is there a way to reuse a WWW connection, make Unity respect the `Connection: keep-alive` header (and thus not reestablish the hand shake with each new instance) or another method? I found this [Unity employee state they are "working on it" for the UnityWebRequest class][1] but that was a year ago and "noted" is "noted" is the developer equivalent of a blow off. The [official documentation still states you can not set that header][2]. [1]: https://forum.unity3d.com/threads/unitywebrequest-and-keep-alive.364236/ [2]: https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.SetRequestHeader.html

Viewing all articles
Browse latest Browse all 387

Trending Articles