-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run multiple replicas in k8s of bot app #2112
Comments
Hi, @MrPatryk! Thank you for your question! 🙌 Based on what you've described, it does sound like the expected behavior of Bolt with socket mode. By design, when there are multiple connections, Socket Mode will randomize sending the event between the socket connections. As mentioned here, this might be a good potential workaround:
|
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized. |
How run multiple replicas of bot app in k8s and still handle it only in 1 insance till it dies. We run our bot using k8s but sometimes it scales down/up moving node to other vmk - like 4-5min break in bot work while its starting again. For 1 replica all works fine, but when we have more than 1 there is race condition. There is any way to setup it to support 2+ isntances of bot and don't make mess with handling events/commands as 1st started instance, not both (with 50% of working for 1st bot/50% for 2nd).
@slack/bolt
version^3.15.0
Your
App
and Receiver Configurationconst app = new App({
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
socketMode: true,
appToken: process.env.SLACK_APP_TOKEN,
port: 3000
});
Node.js runtime version
v16.13.0
Steps to reproduce:
(Share the commands to run, source code, and project settings)
Expected result:
Only one bot handles all events
Actual result:
50% that 1st bot catch command and says 1st msg, 50% that 2nd bot reply with diff message
Requirements
The text was updated successfully, but these errors were encountered: