Issue with slow API response time on GET calls.

Hey, I’m trying to migrate from Heroku to DigitalOcean with my simple Spring Boot API based on MongoDB (mLab).

My metrics are ok, just Disk Usage looks strange (Always 100%) Link to metrics: [Metrics CPU and memory] ( and Disk Metrics

On Heroku with the worst CPU and memory, I have x4 faster response on GET calls with the same codebase. POST and PUT calls are ok or even better on DigitalOcean.

Old Heroku API call: Result here New DigitalOcean API call: Result here

What is the difference between these two servers that make such degradation in performance? What steps should I do to fix it? Please, can somebody help me with that?

I can give more info if necessary. Thanks

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.

Hi there,

I have chosen a Droplet with already installed Docker, make configuration of Certificates and that is it. After that, I just deploy my Spring Boot with Dockerfile.

As I know, Spring boot has Apache inside, so I didn’t install it, have no idea why it’s showing Cowboy on Heroku and nothing on Digital Ocean (server header).

Do I need more configuration or installations to make ready to go Droplet with Docker?

Thank you,!

Hi there @chichideveloper,

As far as I can see the Heroku IP was based in Dublin but the DigitalOcean IP that you’ve shared is in California, the latency could explain the extra time that you are seeing.

What I could suggest is either creating a Droplet in a region that is closer physically to you, or what you could do is use a CDN like Cloudflare to reduce the latency in general.

Let me know how it goes. Regards, Bobby