< Home

host

Function

The host command creates a host matching rule.

The undo host command deletes a host matching rule.

Format

host pattern-string mode { prefix | suffix | exact | any }

undo host pattern-string mode { prefix | suffix | exact | any }

Parameters

Parameter Description Value
pattern-string Specifies the matching string. The value is a string of 2 to 128 characters.
mode Indicates the matching mode. -
prefix Indicates the prefix matching mode. -
suffix Indicates the suffix matching mode. -
exact Indicates the exact matching mode. -
any Indicates the any matching mode. -

Views

HTTP scheduling policy profile view

Default Level

2: Configuration level

Usage Guidelines

In an HTTP server cluster, different hosts correspond to different real servers. Load balancing is based on hosts.

For host-based SLB:
  • When an HTTP request packet matches a sticky session entry, the packet is distributed based on the entry.
  • When selecting a new real server for load balancing, select the real server associated with the HTTP requested host.

Example

# Create HTTP scheduling policy file abc, add a host rule, and set the matching mode to any.

<sysname> system-view
[sysname] slb
[sysname-slb] httpclass abc
[sysname-slb-httpclass-0] host 7.7.7.7 mode any
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >