edit-icon download-icon

Traffic management

Last Updated: Mar 19, 2018

Overview

During application publishing and product iteration, the following scenarios and requirements are typical:

  • Gray release

  • Blue-green release

  • A/B testing

  • Marketing: Strategic new product launch, for example, roll out new product to 50% of users and compare with existing product.

The traffic management function is used to allocate traffic that meets the defined rules to specific groups based on the custom solution set on the console, so as to meet the preceding scenarios and requirements.

Configure traffic management

Prerequisites

  • EDAS standard/professional/platinum edition is required.
  • The application for which the traffic management function is to be used must contain at least two groups. Each group contains at least one application that runs properly. If no group exists, log on to the EDAS console and create a group.

Procedure

  1. In the EDAS Console, select Applications in the left-side navigation pane, and then click the name of the application whose traffic is to be managed.

  2. On the application details page, select the Instance Information tab, and verify that the groups for traffic management is available.

  3. Select Traffic Control in the left-side navigation pane of the application details page.

  4. Click Create Solution in the upper-right corner of the traffic management page.

  5. On the Solution Details page, enter the solution name and set the traffic management rule.

    The traffic management rule can be set to “Parameter Modulo” or “List Diverging”.

    • Parameter Modulo: Based on the modulo operation, allocate traffic that meets the rule to the target application group.

      Rule: Cookie[$key] mod 100 < $percent, perform the modulo operation on 100 using the specified key in Cookie. If the result is smaller than the configured percentage, allocate the traffic to the target application group.

    • List Diverging: Based on the list, allocate the listed traffic to the target application group.

      If the value of the corresponding field of the requested Cookie is in the list, allocate traffic to the target application group.

  6. After the solution is set, click Save.

Verify result

Verify the solution status

After the solution is created, you can view it in the solution list. The solution is disabled by default. You can edit or delete the solution. After the solution is enabled, you cannot edit or delete it.

Note: You can configure multiple traffic management solutions for different Cookies. However, only one traffic management solution can be enabled at a time.

Verify the function

  1. Download the compiled application demo: app-latest.war (new version) and app-old.war (old version). Refer to Deploy an application to deploy the WAR packages to the custom group (used for gray traffic) and default group, respectively.

  2. After the packages are successfully deployed, set the value of userId in Cookie on the page. After saving, the page is automatically refreshed.

  3. Set the solution and verify the function as follows:

    • Rule Settings: List Diverging

    • Parameter: userId

    • List: 123456789

    • Deployed packages in different groups:

Thank you! We've received your feedback.