Adding hyperdrive to our MySQL database
Adding hyperdrive to our MySQL database on planetscale resulted in higher latency
6 Replies
Do you have more to share? Is this a specific query? In our testing we expect comparable results and not higher latency. What database driver are you using?
Could it be the region? Database is in ap-south-1 . We are using drizzle/mysql2
It’s all the queries, except the cached ones
Most affected are DB transactions
While the region does affect latency it should basically never make it worse than a direct connection.
I'll take a look at where your pool is instantiated. If that's at issue I can manually fix that.
Mind sending me your Hyperdrive ID?
Here a36a10ef4bdc469ca155d0a94a6c1a27
I'm seeing your Worker running in/near Amsterdam, with your connection pool housed in Mumbai, same as ap-south-1 is. Placement seems pretty solid. I am genuinely surprised here, I don't see any reason Hyperdrive wouldn't be much, much faster than a direct connection with that ORM+driver over those kinds of distances.
What kind of latencies are you seeing for each?
We're planning to do a track of work on the beta feedback we've gotten for MySQL so far, I'll add this to the list. FYI @Adrian
So I’m seeing our crediting and debiting ledger workflow step (basically a DB transaction) move from 4-5 seconds to 7-8 seconds this so far is the most significant. The select queries (e.g. list all payments) where i expect improvement on API responses is still 400-600ms without caching. On cached requests we get 200-300ms