Traffic Splitting in Azure Static Web Apps (preview)

Traffic splitting allows you to divert a percentage of traffic to different branch environments.

Traffic splitting is only available on the Standard hosting plan.

Split traffic

Before you can split traffic between branches, you first need to have open pull requests to create separate environments.

To split traffic among different environments, use the following steps:

  1. Open your static web app in the Azure portal.

  2. From the Settings section, select Environments.

  3. Select the Traffic splitting tab.

  4. Select the Add button to create a new row in the traffic mapping table.

  5. From the dropdown, select name of the pull request you want to target.

  6. Enter the percentage amount of traffic you want to allocate among the different environments.

    Adjust the values in each of the input boxes in the Traffic column so the total equals 100%.

  7. Select Save to commit your changes.

Disable traffic splitting

To disable traffic splitting, select the Traffic splitting to open the settings window.

Remove all nonproduction environments from the list and save your changes.

Next steps