To implement a slack bot, i need to deal with 'Real Time Messaging API' of slack. It is a WebSocket-based API that allows you to receive events from Slack in real time and send messages as user. more info: https://api.slack.com/rtm
To create a bot for only one team, i need to open one websocket connection and listen it for events.
To make available the slack bot for another team. I need to open a new websocket connection. So,
- 1 team => 1 websocket connection
- 2 teams => 2 websocket connections
- N teams => N websocket connections
what should i do to scale my websocket connections for endless teams?
What kind of architecture can handle autoscaling of 1000’s of websockets connections?