Why does query latency fluctuate so much
Why does query latency fluctuate so much? It's normally around 60 ms but sometimes down to 10 ms for short periods.
7 Replies
What does your data access pattern look like? might that be the difference between a cached query and an uncached query?
Cache is disabled and mostly simple select all queries on small tables.
What is the expected latency for a database hosted on neon with cache disabled?
Tested again now as it started at around 15ms but then suddenly went up to 60ms and then back down.
It's not consistent.
These might be network level routing fluctuations, which region is the request being made from and which region is your database located in?
The request is from EU and the database is also hosted there.
It's just noticeable when the latency is higher versus lower.
Hey @thomasgauvin what's going on now? Tested again with lantecy above 150 ms, almost slower than direct connection.
It's actually twice as slow than local direct connection.
Can confirm that something in wrong, the total request latency is almost 5x bigger when using hyperdrive when deployed.
The issue appears to be related to hyperdrive configurations that reuse old names in the dashboard. When you delete a hyperdrive and then recreate it using the same name, the latency is five times higher compared to creating a hyperdrive with a new name.
That's very odd. I can't think of any reason for that to have any impact on performance. I don't think we have literally any of our logic conditioned on the Hyperdrive's name. I'll test that this week and get back to you.
@Isak if you wouldn't mind sending me your hyperdrive id, I'd like to take a look?
It seems there was some problem with the Neon. Created a new project and now everything works fine. I'll let you know if it happens again. By the way, any news on smart placement for tcp connections?