Do managed databases throttle performance based on the query source?

I’m working with a Python script that saves/updates batches of data to a MySQL database and have observed a strange and dramatic difference in performance.

When I run my Python script from GitPod, it takes about 100 seconds to update 1,000 rows in the database.

When I run the same script on a DO droplet in the same datacenter as my database, it takes <1 second to update 1,000 rows in the database.

I don’t think it’s a bandwidth issue, the gitpod has great connection: Download: 1268.49 Mbit/s Upload: 962.83 Mbit/s

The only idea I’ve come up with is that DO is throttling the performance of queries that come from an external network, but the difference in performance seems pretty extreme.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
January 5, 2024

Hi there,

I believe that the DigitalOcean’s Managed MySQL Databases, typically do not deliberately throttle performance based on the query source.

There could be several other factors that might contribute to the performance difference you’re observing between running your script from GitPod and a DigitalOcean Droplet.

My guess here would be that this is due to the network latency. Even with high bandwidth, network latency can be a significant factor. The closer your application is to the database server, the lower the latency. Since your Droplet is in the same data center as your database, it benefits from very low latency, which isn’t necessarily the case with GitPod.

You can try performing a traceroute from GitPod to your DigitalOcean database to check for any network bottlenecks.

Also if possible, consider hosting your application closer to your database to reduce the latency.

Let me know how it goes.



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel