You can use this page to prepare an MDriven Turnkey deployment for Azure App Service scale-out and to identify the Azure App Service behavior you must verify before adding instances.
Scope
Scale out means running more than one instance of an Azure Web App so that Azure can distribute application workload between instances. This page covers the Azure App Service considerations for an existing MDriven Turnkey deployment; it does not replace the installation procedure.
Before you scale out, make sure you can identify the two MDriven components involved:
- MDriven Turnkey is the web application users open in their browser.
- MDrivenServer is the server component that Turnkey connects to.
For example, an Azure installation can use one Azure app for Turnkey and a second Azure app for MDrivenServer. It can also host both in one Azure app, with Turnkey in site\wwwroot and MDrivenServer in site\wwwroot\__MDrivenServer. The supported installation layouts and configuration files are described in HowTos:Install MDriven Server and Turnkey on Microsoft Azure.
Before you add instances
Complete these checks on one working instance first. Scaling out a deployment that has not been validated makes faults harder to diagnose.
- Install and verify the application by following HowTos:Install MDriven Server and Turnkey on Microsoft Azure.
- Confirm that Turnkey opens at its expected URL and connects to MDrivenServer.
- Confirm that WebSockets are enabled for the Azure app. The Azure installation guidance identifies WebSockets as required for Turnkey and MDrivenServer communication.
- Review the physical paths used by the deployment. In a single-app layout, verify that
/__MDrivenServeris configured as a virtual application and that it maps tosite\wwwroot\__MDrivenServer. - Review every file and setting that your application requires at runtime. In particular, account for the override files placed under
App_Data, such asCommandLineOverride.xml,MDrivenServerOverride.xml, andTurnkeySettingsOverride.xml, where applicable. - Remove
App_Data/PwdReset.txtafter you have used it to reset the MDrivenServer password. The Azure installation procedure explicitly instructs you to delete this file after verifying the new password.
| Check | Why it matters during scale-out | Example |
|---|---|---|
| Deployment layout | Each running instance must use the intended Turnkey and MDrivenServer paths. | In a combined app, Turnkey remains under site\wwwroot while MDrivenServer remains under site\wwwroot\__MDrivenServer.
|
| Runtime configuration | An instance must start with the configuration that tells it how to run and where Turnkey connects. | Keep the required files under App_Data available to the deployed application.
|
| WebSockets | Turnkey and MDrivenServer require WebSockets to communicate properly. | Enable WebSockets in the Azure app before testing with additional instances. |
| Credentials and reset files | A password-reset file is a setup mechanism, not a file to retain after verification. | Delete PwdReset.txt after logging in with the new password.
|
Understand the Azure App Service file system
Before deciding how to distribute files or store runtime-generated data, review Azure's App Service file-system behavior. Azure documents which parts of the file system are persistent and how file access behaves in an App Service environment.
- Understand the Azure App Service file system
- Review Azure App Service operating-system functionality
- Review Azure App Service app settings
Treat this review as a deployment requirement, not a post-scale troubleshooting step. For example, if your deployment process writes an override file below App_Data, determine from the Azure documentation how that file is deployed and available when more than one instance is running.
Choose and document the topology
Use the deployment layout that you have installed and document it before scaling out.
| Layout | Turnkey location | MDrivenServer location | Configuration point to verify |
|---|---|---|---|
| Separate Azure apps | One Azure app | A different Azure app | Turnkey's MDrivenServerOverride.xml must specify the MDrivenServer URL.
|
| One Azure app | site\wwwroot
|
site\wwwroot\__MDrivenServer
|
Azure Path mappings must define /__MDrivenServer as an application with physical path site\wwwroot\__MDrivenServer.
|
Do not change between these layouts as part of an instance-count change unless you also follow the installation guidance and retest the connection between Turnkey and MDrivenServer.
Scale-out procedure
Use the Azure portal to change the instance count or scale configuration for the App Service Plan that runs the app. The Azure portal settings and available scaling choices depend on the App Service Plan you use.
- Record the current working deployment layout, application URL, MDrivenServer URL, and relevant
App_Dataoverride files. - Review the Azure App Service file-system and app-settings documentation linked above.
- In the Azure portal, open the App Service Plan used by the application and apply the scale-out change appropriate to that plan.
- Verify that the Turnkey URL still opens after the change.
- Verify that Turnkey can communicate with MDrivenServer.
- Repeat the verification from more than one browser session or device. For example, open the same Turnkey application from a desktop browser and a phone, then confirm that both can load the application.
- If the deployment uses separate Azure apps, verify both the Turnkey app and the MDrivenServer app after the scale change.
Validate after every deployment
Repeat these checks after deploying updated Turnkey or MDrivenServer files:
- Confirm that the expected application files are deployed to
site\wwwrootand, for a combined deployment,site\wwwroot\__MDrivenServer. - Confirm that the MDrivenServer virtual application is still configured as an application. The installation guidance states that its checklist options should not be selected.
- Confirm WebSockets remain enabled.
- Confirm that the Turnkey-to-MDrivenServer connection still works.
- Confirm that debug information is turned off after the Turnkey application is accessible, as directed by the Azure installation guidance.
Deployment and change management
Use the initial Azure setup procedure before treating the site as a scale-out candidate. The installation guidance recommends using MDriven Portal for at least the first deployment so that the strong password and initialization files are updated. After the initial setup, the same guidance identifies OneDrive as an option for deploying new Turnkey and MDrivenServer code.
For Azure account setup and publication from MDriven Designer, see Documentation:Hosting turnkey on my own Azure account. For the complete Azure installation and MDriven Portal workflow, see HowTos:Install MDriven Server and Turnkey on Microsoft Azure.
See also
- Documentation:Microsoft Azure
- Documentation:Hosting turnkey on my own Azure account
- HowTos:Install MDriven Server and Turnkey on Microsoft Azure
- Documentation:Deployment
- Documentation:Turnkey
Prepare an Azure deployment for Turnkey
Prepare an Azure deployment for Turnkey
The documented Azure installation procedure supports deploying MDriven Turnkey and MDriven Server either in separate Azure apps or together in one Azure app. Enable WebSockets and configure the Turnkey-to-Server connection before using the deployment.
Choose an application layout
The installation guidance describes the following layouts:
| Layout | Deployment arrangement |
|---|---|
| Separate Azure apps | Create one Azure app for MDriven Server and one Azure app for MDriven Turnkey. Deploy each component to the site\wwwroot directory of its respective app.
|
| One Azure app | Deploy Turnkey to site\wwwroot and deploy MDriven Server to site\wwwroot\__MDrivenServer.
|
For the one-app layout, open Settings > Configuration > Path mappings in the Azure App panel. Create a virtual application with these values:
| Setting | Value |
|---|---|
| Virtual path | /__MDrivenServer
|
| Physical path | site\wwwroot\__MDrivenServer
|
| Type | Application |
Do not select the checklist items for the __MDrivenServer virtual application. The documented Server address for this layout is <Your Azure App Domain>/__MDrivenServer/.
Configure the deployed applications
- Download the current MDriven Turnkey and MDriven Server application files from the MDriven downloads page.
- Deploy the files according to the selected layout.
- In the MDriven Server application files, create
App_Data/CommandLineOverride.xml. The installation guidance states that this file specifies the MDriven Server location and is required for .NET Core applications using IIS. - In the Turnkey application files, create
App_Data/CommandLineOverride.xml. The installation guidance states that this file specifies the MDriven Turnkey location and is required for .NET Core applications using IIS. - In the Turnkey application files, create
App_Data/MDrivenServerOverride.xmland specify the URL of the MDriven Server to which Turnkey connects. - Create the Turnkey settings override file in
App_Data, following the filename and contents in the installation guide. - Enable WebSockets for the Azure App. The installation guidance says WebSockets are required for Turnkey and MDriven Server to communicate properly.
- After confirming that the Turnkey application is accessible, set debug information to
False.
The installation guide also describes resetting the MDriven Server password with App_Data/PwdReset.txt, then deleting that file after testing the new password. It recommends performing at least the first deployment through MDriven Portal so that the strong password and initialization files are set up.
Scale-out decisions requiring confirmation
The supplied installation guidance does not state that Azure scale-out or autoscale is supported for a particular MDriven topology. Before running more than one instance, obtain version-specific guidance for:
- Multiple Turnkey instances connecting to one MDriven Server instance.
- Multiple MDriven Server instances using the same application database.
- Session and WebSocket behavior when requests are served by different instances.
- Any Azure routing or load-balancer affinity requirements.
- Configuration files, model deployment, logs, and persistent files that must be shared or managed separately across instances.
- Database connection-pooling limits and database configuration for the intended instance count.
Do not treat Azure platform capabilities alone as confirmation of MDriven multi-instance support.
