Server Load Balancing : Configuring content routes
 
Configuring content routes
You can use the content routes configuration to select the backend server pool based on matches to TCP/IP or HTTP header values.
Layer 7 content route rules are based on matches to the following header values:
HTTP Host
HTTP Referer
HTTP Request URL
SNI
Source IP address
You might want to use Layer 7 content routes to simplify front-end coding of your web pages or to obfuscate the precise server names from clients. For example, you can publish links to a simple URI named example.com and use content route rules to direct traffic for requests to example.com to a server pool that includes server1.example.com, server2.example.com, and server3.example.com.
Layer 4 content route rules are based on matches to the following header values:
Source IP address
Before you begin:
You must have a good understanding of HTTP header fields.
You must have Read-Write permission for Load Balance settings.
After you have configured a content routing rule, you can select it in the virtual server configuration.
To configure a content route rule:
1. Go to Server Load Balance > Virtual Server.
2. Click the Content Routes tab.
3. Click Add to display the configuration editor.
4. Give the rule a name, select the type, and specify rule settings as described in Table 9.
5. Save the configuration.
 
Table 9: Content routes configuration guidelines
Settings
Guidelines
Type
Layer 4
Layer 7
Pool
Select a real server pool.
Inherit Persistence
Enable to use the persistence object specified in the virtual server configuration.
Persistence
If not using inheritance, select a session persistence type.
Inherit Method
Enable to use the method specified in the virtual server configuration.
Method
If not using inheritance, select a load balancing method type.
Layer 4 Specifics
IPv4/Mask
Address/mask notation to match the source IP in the packet header.
IPv6/Mask
Address/mask notation to match the source IP in the packet header.
Layer 7 Match Condition
Object
Select content matching conditions based on the following parameters:
HTTP Host Header
HTTP Referer Header
HTTP Request URL
SNI
Source IP Address
Note: When you add multiple conditions, FortiADC joins them with an AND operator. For example, if you specify both a HTTP Host and HTTP Request URL to match, FortiADC applies the specified action only to requests or responses that meet both conditions.
Tip: If you need to create a default route, create a condition that does not have any expression, then place it last in the condition table. This will match all requests that did not match any previous criteria.
Type
String
Regular Expression
Content
Specify the string or regular expression syntax.
Reverse
Rule matches if traffic does not match the expression.
Reordering
After you have saved a rule, reorder rules as necessary. The match condition table is consulted from top to bottom. The first rule that matches is applied and subsequent rules are not evaluated.