Report this

What is the reason for this report?

How To Use Socket.io In App Platform With Multiple Containers

Posted on January 21, 2022

It is my understanding that I must enable sticky sessions in order for Socket.io to work in a multiple server/node (scaled) setup. Is this done by default in App Platform? If not, how might I go about including an Apache or Nginx or similar code snippet that would enable such functionality?



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.

This comment has been deleted

Heya,

As of now, DigitalOcean App Platform does not support sticky sessions. Because of this, running a service across multiple instances that relies on sticky sessions — like a Socket.IO server — may deliver unexpected results.

For more information, you can refer to this DigitalOcean documentation: DigitalOcean App Platform Docs.

Hope that this helps!

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.