Large business scale often requires scaling Bot Framework App Instance from one to many. To make this work, the bot application needs to serialize memory info to storage, otherwise users may hit conversation state lost issues intermittently, for example, the next request doesn’t affinity on the same instance and then user feels bot doesn’t smartly follow previous conversation, or Skills Bot calling back with the same conversation ID but different instance, and root bot returns 404, etc. A typical root + skills bot infrastructure is like this:
To solve this problem in Bot Framework Composer, developers can configure Bot Framework Composer project setting. However after several updates in Bot Framework Composer, this part configuration guide becomes unclear and not up to date. Therefore, based on practical experience and code understanding on Bot Framework Composer microsoft/BotFramework-Composer, I have compiled the configuration considerations for this part, hoping to help developers and projects that encounter similar situations.
Create Cosmos DB Azure Resource firstly.
Open Bot Composer. Click Configuration, and choose the default bot, please choose the root bot if there are skills bots in the same project
Choose Advanced Settings View
Inside the runtimeSettingssection, add this "storage" setting, please use the same key word CosmosDbPartitionedStorage: