perf: keep-alive connection to broker/bridge
I was snooping around in devtools and noticed that each /proxy
request involves a new TLS handshake, if I'm not mistaken:
I think it'd be good for performance to keep the connection alive between requests. This issue may also apply to other pieces of the Snowflake project, so maybe need to transfer it.
This shouldn't affect the bootstrap speed for clients since we connect to the bridge in parallel, so maybe not that important.
Looks like the Keep-Alive
and Connection
headers can't be set from within JS: https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name. Idk how this can be done then.
Related: snowflake#29736 (closed), snowflake#40133 (closed),
Edited by WofWca