Regional snake latency reported wrong on profile page #144
Replies: 3 comments
-
Thanks for the bug report @emilv! We'll look into what's going on here. |
Beta Was this translation helpful? Give feedback.
-
@emilv It looks to me like your Battlesnake is configured without a trailing forward slash, but the server redirects with HTTP 301 to add a slash when one is missing. When I hit the URL that's currently configured, I get this:
(I've redacted the URL in the Location header above since this post is public, but it's the same URL, just with a trailing forward slash) It looks like our code automatically follows this redirect, but it adds significant latency to the whole transaction. I tested it out with the trailing slash added to the URL, and I'm now getting a consistent 30-35 ms instead of 300-500 ms. I haven't yet looked into our logs, but my guess is that the redirect is handled earlier in the flow (like in the API server instead of the proxy server) and several long-distance round trip times happen as a result. |
Beta Was this translation helpful? Give feedback.
-
@robbles That solved it :-) |
Beta Was this translation helpful? Give feedback.
-
I have a snake living in Gothenburg and set the region to GCP EU-WEST4. During gameplay the latency is steady at about 40 ms but the snake profile reports a "very high latency" of over 1000 ms!
I have tried refreshing the snake multiple times but keeps getting the same result.
The snake is a Nodejs application that is always running on my server (not an "app engine") so the problem is not caused by warmup on my side.
Beta Was this translation helpful? Give feedback.
All reactions