Hi,
I'm using AppEngine Flexible for a Discord bot. The application needs to keep one Web Socket connection to Discord Web Socket server. So, when the application starts, it opens a Web Socket connection and keep connected with Discord Web Socket server.
When the application is scaling up and running multiple instances at the same time, it also establish multiple Web Socket connections to Discord Web Socket server. In the result, the bot receive same events on multiple instances and replies multiple identical messages.
How can I make sure that the bot establish only one Web Socket connection to Discord Web Socket server?
Best,
Bao