Report this

What is the reason for this report?

How to lower the latency of requests to the DB

Posted on July 15, 2020

We currently have 2 servers in the NYC3 region, the first is a web service (django) and the second a postgresql BD. It turns out that we are migrating the web service to kubernetes. We configure some clusters in the same region (NYC3) and we raise the web service, but the latency in the requests to the BD (External server but in the same region) is too high, which leads to very long pages loading times. What can I do, I don’t want to migrate the DB to a kubernetes. Can I improve latency in any way?



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!

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.

Hi @felipegarridov

Since everything you mentioned is in the same region, NYC3, are you sure you are using the Private Network IPs to connect?

  1. Make sure you enable the private network on both servers, you can follow this guide
  2. Use the private IP instead of the public one to connect to your database from your web app

You should see a huge latency improvement.

Islam @ SimpleBackups

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.