We have a local (not azure) deployment of a bot using MS bot framework. Currently the service is running on three machines, all serving the single api endpoint. Everything works fine when we only have the service running on one machine. If we run it on all three, however, the conversation context can get lost. For example, here is a flow we have:
- User says they want to do x
- Bot matches with the correct LUIS intent, and asks for more information
- User provides necessary info (an IP address)
- Bot runs a method to find the info they want and returns it to them. We do this by context.Wait().
If we have the service running on multiple machines, this is what happens sometimes:
- machine A handles step 1 and 2
- the controller on machine B gets the answer the user provides in step 3 and, I assume because it doesn't have the conversation context machine A had, it sends that text to LUIS rather than calling the method that should be called. LUIS doesn't have an intent that matches the IP, and an error occurs.
What's the best way to handle maintaining conversation context when the service is running on multiple machines? Context.Forward? And/or other ideas?
Thanks!