You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have remote server on the other side of the globe. Simple (first) postman request to this server takes around 600ms to complete, including dns lookup and tcp handshakes.
Consecutive requests use cached dns and handshakes, so one request takes around 160ms.
Though, when i send identical request to localhost reverse proxy each request takes around 330ms. I guess establishing new connection each request takes its toll.
Using already existing reqwest::Client cuts time in half, resulting in around 162ms.
I propose maybe use one Client, created lazily with lazy_static.
The text was updated successfully, but these errors were encountered:
Hello!
I have remote server on the other side of the globe. Simple (first) postman request to this server takes around 600ms to complete, including dns lookup and tcp handshakes.
Consecutive requests use cached dns and handshakes, so one request takes around 160ms.
Though, when i send identical request to localhost reverse proxy each request takes around 330ms. I guess establishing new connection each request takes its toll.
Using already existing
reqwest::Client
cuts time in half, resulting in around 162ms.I propose maybe use one
Client
, created lazily withlazy_static
.The text was updated successfully, but these errors were encountered: