1

I have developed a slack bot (which is part of my an existing node.js app) which works fine on my dev environment.

But as soon as I deployed this on my staging instance of the app, it started responding to me with duplicate message.

My staging server (example.com) consists of 2 machines for HA, and code gets deployed on both the machine. So I dobut, since bot is running on both the machine, its giving me duplicate replies.

Can anyone please let me know how to ask bot to reply from either of the server. Or let the bot reply only once.

I hope my question is clear, let me know if you need any mroe info.

undefined
  • 3,464
  • 11
  • 48
  • 90
  • This is a bit odd. Even in an active/active configuration a request will only be sent to the 2nd node if the 1st node failed. Can you confirm that bots your instances receive the same request (logfile etc.)? – Erik Kalkoken Feb 18 '18 at 16:28
  • yes, the bots receives same requests.. and replies with same data from both instances. – undefined Feb 18 '18 at 18:08
  • This sounds like a configuration error on the HA. It does not make sense to duplicate requests for a REST web service. I would check HA config settings. And id that is not an option, you need to implement some kind of synchronization between your two instances. But that has nothing to do with Slack. – Erik Kalkoken Feb 18 '18 at 18:33

0 Answers0