Forum Discussion
voonsionglum
Nov 29, 2021Brass Contributor
Root bot, skill bot and scaling
Hi, We need help with scaling. Problem statement: With 2 instances of root bot running, a skill bot invocation is unable to return results reliably to the root bot. With 1 instance of the...
- Dec 14, 2022
We had James check his data and found this. See if it helps. In the root bot:
- Double check and be 100% sure that you're using the SkillConversationIdFactory that is a part of the MS chatbot framework (NOT one that you may have created). It should have a IStorage constructor parameter that lets you pass in whatever storage you want to use to persist ids used with skills communication. You probably need to use the class that is given to you in the chatbot framework. (i.e. SkillConversationIdFactory that inherits from"Microsoft.Bot.Builder.Skills.SkillConversationIdFactoryBase")
- For the IStorage object used by SkillConversationIdFactory, If you are using some kind of in-memory only storage, (i.e. A ConcurrentDictionary or other MemoryStorage type object), that might be a problem. The code in SkillConversationIdFactory might not be persisting the conversation/skill ID lookup data (needed to talk with skills) into a place that other apps can read.
I have found some old MS examples that give a "demo" of how to use skills and shows a SkillConversationIdFactory that uses in-memory storage...which of course won't scale or work across different apps.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.bot.builder.skills.skillconversationidfactory?view=botbuilder-dotnet-stable
voonsionglum
Dec 07, 2021Brass Contributor
Hi,
Please refer to https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/80.skills-simple-bot-to-bot for the sample code.
Once the root bot and skill bot have been deployed, please SCALE OUT the root bot so that it has more than 1 instance. Once scaling is done, try interacting with the root bot.
Thank You
Please refer to https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/80.skills-simple-bot-to-bot for the sample code.
Once the root bot and skill bot have been deployed, please SCALE OUT the root bot so that it has more than 1 instance. Once scaling is done, try interacting with the root bot.
Thank You
HunaidHanfee-MSFT
Dec 15, 2021Iron Contributor
Could you please share how did you scale out? Did you created a new App registration for that or can you share the steps?
- voonsionglumJan 04, 2022Brass ContributorHi,
Here are the steps we took to scale out our root bot
1. Click on "Scale out (App Service plan)"
2. Select "Manual scale"
3. Under "Override condition", set "Instance count" to any number other than 1 (eg. 3)
4. Click "Save"- HunaidHanfee-MSFTJan 14, 2022Iron Contributor
voonsionglum -
We have deployed a root bot instance attaching the manifest please try it your side and check if you are facing the same with our app as well.
Please let us know if you are still facing this issue.- voonsionglumJan 17, 2022Brass ContributorThat's very interesting. We were using the botbuilder-samples from 4.9.0. We have not tried the latest ones from 4.15.0. I wonder if that makes any difference. We'll try the latest root bot skill bot samples and let you know how things go.
Thank You
- HunaidHanfee-MSFTJan 14, 2022Iron ContributorHello,
We have been trying to get a repro at our end, but it is working fine for us.
Here's what we did -
1. We publish Skill to Azure
2. We publish RootBot to Azure.
3. We installed the manifest and interacted we got the response from skill.
4. We go to Azure and Scale out to two instance. Again interacted and we got response.
Here we have not created any new app registration or given new app Id anywhere(if maybe needed). Please let us know if we are missing something.
- HunaidHanfee-MSFTDec 21, 2021Iron ContributorCan you please tell us what approach you have followed?
- HunaidHanfee-MSFTDec 23, 2021Iron ContributorWe didn't hear anything on this issue from a while. Feel free to share updates on it.