During application publishing and product iteration, the following scenarios and requirements are typical:
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.
- 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.
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.
On the application details page, select the Instance Information tab, and verify that the groups for traffic management is available.
Select Traffic Control in the left-side navigation pane of the application details page.
Click Create Solution in the upper-right corner of the traffic management page.
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.
After the solution is set, click Save.
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
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.
After the packages are successfully deployed, set the value of userId in Cookie on the page. After saving, the page is automatically refreshed.
Set the solution and verify the function as follows:
Rule Settings: List Diverging
Deployed packages in different groups: