This topic describes how to configure global routing rules for a geo-redundancy instance.
Prerequisites
Procedure
Log on to the Multi-active Disaster Recovery (MSHA) console.
In the left-side navigation pane, choose Multi-active Instances to open the Multi-active Instances page.
On the Multi-active Instances page, find the multi-active instance that you want to configure, and then click its ID to open the Instance Overview page.
In the left-side navigation pane, choose Global routing configuration to open the Global routing configuration page.
In the Access layer routing configuration section, configure the access layer routing label extraction method and the access layer unlabeled traffic distribution switch.
Configuring the access layer routing label extraction method enables precise routing by extracting business parameters from HTTP traffic to use as routing labels. You can extract from an HTTP header, HTTP cookie, or HTTP parameter. You must specify the key, such as
routerId.NoteIf the routing parameter is in the header, the key must start with a letter and can contain only letters, numbers, and hyphens (-).
If the routing parameter is in a cookie or parameter, the key must start with a letter and can contain only letters, numbers, and underscores (_).
Enable or disable the access layer unlabeled traffic distribution switch.
Turn on the Access Layer Unlabeled Traffic Distribution switch: The access layer distributes traffic across multiple units based on the proportions defined in the routing rules.
Turn off the Access Layer Unlabeled Traffic Distribution switch: The access layer relies on DNS weight-based distribution and routes all traffic to the local unit by default.
NoteWe recommend disabling access layer distribution after you adjust the routing rule proportions and the DNS weights have taken effect. This practice reduces cross-unit traffic and response time, improving user experience.
While access layer unlabeled traffic distribution is disabled, avoid adjusting the routing rules. Otherwise, traffic may not follow the new rules for a period. This delay depends on the time it takes for the DNS weight changes to propagate to all clients.
A routing label parsing rule defines how a routing label is parsed.
Click + to add a routing label parsing rule used for traffic switching. Configure the routing rule in the Add routing label parsing rule panel and on the Add routing rule page.
Configure a range rule
In the Add routing label parsing rule panel, set Routing rule to Range.
Set the Number of characters to truncate.
Set the Modulo value.
In the Test routing label parsing text box, enter test content and click Test to check if the result meets your expectations.
Click Test to verify that the parsing rule can parse the routing parameters. A result is displayed if the extraction is successful. Otherwise, an error message is displayed.
Click OK.
Configure a custom rule
In the Add routing label parsing rule panel, set Routing rule to Custom.
In the Routing label parsing rule section, enter a parsing rule and click Parse.
In the Test routing label parsing text box, enter test content and click Test to check if the result meets your expectations.
Click Test to verify whether the parsing rule can parse the routing parameters. If a result is displayed, the extraction is successful. Otherwise, an error message is displayed.
Click OK.
NoteThe geo-redundancy architecture supports only range rules, not exact match rules.
After you configure a routing label parsing rule, you can configure a corresponding routing rule based on the routing label parsing rule.
A range routing rule defines the traffic distribution ratio between the two units.
Drag the slider on the central unit or regular unit range selector to change the traffic distribution ratio.
Enable the rule initialization switch to enter specific values for the traffic range and change the distribution ratio.
NoteThe traffic ranges of the central unit and the regular unit must be contiguous and non-overlapping. For example, if the traffic range for the central unit is [0,3609], the range for the regular unit is [3610,9999].
Click Save or Save and Apply.
Save: Saves the global routing configuration only. After saving, the baseline status changes to "Modified", and you must apply the baseline again.
Save and Apply: Saves the global routing configuration and applies the baseline. The application result is displayed in the Current result section below.