An HTTP scheduling policy determines how the firewall allocates service traffic to a server group.
An HTTP scheduling policy is configured based on the initial field in HTTP, which includes URL, Referer, Host, and cookie. For a field, such as URL, the real server group has different processing functions and performance in the HTTP and HTTPS server cluster. Different URLs correspond to different real server groups. Therefore, HTTP scheduling policies must be configured for the URLs to schedule the real server groups.
In no ID is specified to create an HTTP scheduling policy, the system automatically assigns an idle ID to the HTTP scheduling policy.
The created HTTP scheduling policy profile can be referenced during virtual service configuration.
In an HTTPS server group, different fields, such as Host, Referer, Cookie, and URL, correspond to different functions and performance of the real server. The HTTP scheduling policy can be configured based on the field to allocate traffic to different server groups.
Each virtual server can reference a maximum of eight HTTP scheduling policy profiles. The priority is matched according to the reference sequence. If an HTTP scheduling policy profile of high priority is matched successfully, it does not go on matching. The httpclass move command is used to adjust the matching priority of an HTTP scheduling policy profile.
After an HTTP scheduling policy profile is referenced by the virtual service, it takes effect only after it is submitted using the slb httpclass commit command. Otherwise, the HTTP scheduling policy profile does not take effect.
# Schedule an HTTP scheduling policy in server group 1.
<sysname> system-view [sysname] slb [sysname-slb] httpclass 1 test [sysname-slb-httpclass-1] host http://192.168.1.1/ mode any [sysname-slb-httpclass-1] action group 1
Run the display slb httpclass [ httpclass-name ] command to view the basic configuration information of an HTTP scheduling policy profile.
<sysname> display slb httpclass
Httpclass profile information(Total 1)
---------------------------------------
Httpclass name : test
Httpclass ID : 1
Pattern item number : 1
type mode pattern-string
host any http://192.168.1.1/
Httpclass action : Dispatch new group 1
hit statistics:
url : 0
host : 0
refer : 0
cookie : 0
----------------------------------------
Table 1 shows the description of the display slb httpclass command output.
Item |
Description |
|---|---|
HTTPClass name |
HTTPClass profile name. This parameter is configured using the httpclass command. |
HTTPClass ID |
HTTPClass profile ID. This parameter is configured using the httpclass command. |
Pattern item number |
Number of matching rules. |
Type |
Matching type. The matching types include Host, Referer, Cookie, and URL. |
Mode |
Matching mode. The matching modes include prefix, suffix, exact, and any matching modes. |
Pattern-string |
Matching string. |
HTTPClass action |
Action of an HTTP scheduling policy profile:
|