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
Prasad_Das-MSFT
Microsoft
Dec 06, 2021voonsionglum
Could you please provide the sample code/repo which you are following up?
- voonsionglumDec 07, 2021Brass ContributorHi,
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-MSFTDec 15, 2021Iron ContributorCould 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-MSFTDec 09, 2021Iron ContributorThanks for sharing the steps, I will get back to you once have the repro.
Thanks