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?
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.
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:
Hope that helps!
- Bobby.