Question

Websockets on App Platform, initial connection is slow, seconds not milliseconds

We’ve been using websockets on App Platform for a long time already, so a service that runs a websocket server, accessed through a path on the App domain.

However, recently I noticed that the initial connection of the websocket can be very slow, 10 or 15 seconds even. When logging, I can see that the request doesn’t reach the service. So in other words it’s not the service that is slow, it’s the App Platform load balancer.

I am now running the websocket server on a separate droplet, and connection time is never slow. But I rather run it inside App Platform for easier maintenance.

Is there something I can do to remedy or further troubleshoot this?


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 20, 2025

Hey @janmisker,

There would be a couple of things that you could check here:

  • Are you using the same amount of resources like CPU and RAM on both the App Platform and the Droplet?

  • Also on the Droplet, are you testing this with the same amount of data stored in your Database?

  • Is the App deployed in the same region as your database and Droplet?

If both the amount of data in your database and the amount of resources is the same, what I could suggest is reaching out to the DigitalOcean support team so they might be able to advise you further on this:

https://www.digitalocean.com/support/

Hope that helps!

- Bobby.

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.