Fortinet white logo
Fortinet white logo

Handbook

Creating a PageSpeed configuration

Creating a PageSpeed configuration

A PageSpeed configuration sets the rule(s) that FortiADC follows when rendering web pages. Creating a PageSpeed configuration object involves the following:

  • Specify the inode/file cache limits
  • Choose a PageSpeed profile (Must be configured in advance)
  • Set page control
  • Set resource control

To create a PageSpeed configuration object:

  1. Click Server Load alance > Application Optimization.
  2. Select the Page Speed tab.
  3. Make the entries or selections as described in PageSpeed configuration.
  4. Click Save when done.

PageSpeed configuration

Parameter Description
PageSpeed
Name

Enter a name for the PageSpeed configuration object that you are creating.

File Cache Inode Limit

Specify the maximum number of inodes that can be cached on FortiADC for this virtual server. The default is 10,000. Valid values range from 1 to 100,000.

Note: An inode is a data structure with information about files or directories on a filesystem on Linux or other Unix-type operating systems. It's generated when a filesystem is created. Within a filesystem, every file and directory has a corresponding inode identified by an inode number. Each inode contains the attributes and disk block location(s) of the file's or directory's data, which may include metadata (e.g., access mode, times of last change, modification) and user, ownership, and permission data.

A filesystem has a set number of inodes, which indicates the maximum number of files or directories it can hold. A FortiADC appliance can support up to 100,000 inodes.

Every time you open a file, the kernel of the server reads the file's inode. The more files and directories you have, the more inodes the server uses. And the more inodes the server uses, the more system resources it consumes. So it is always a good practice to try to limit the number of inodes a host has on a shared server. This will prevent it from using all system resources.

To ensure efficient use of its resources, FortiADC cleans its cache every 10 minutes. It cleans the cache only when either of the following conditions is met:

  • The virtual server has reached its set inode cache limit.
  • The virtual server has reached its file size cache limit.

When performing cache clean-up, FortiADC will use the "first-in first-out" (FIFO) principle to remove the oldest cached inodes or files until the cached data is reduced to less than 75% of its set inode- or file-cache limit(s).

File Cache
Size Limit

Specify the maximum file size that can be cached on FortiADC for this virtual server. The default is 128. Value values range from 1 to 512 (MB).

PageSpeed Profile

Select a PageSpeed profile from the list menu.

Note: You must have PageSpeed profiles created before you start to create a PageSpeed rule. For instructions on how to create a PageSpeed profile, refer to Creating PageSpeed profiles

Page Control
Type

Select either of the following page control types:

  • Include — If selected, FortiADC will process Web pages associated with the URI specified below.
  • Exclude — If selected, FortiADC will skip Web pages associated with the URI specified below.
URI Pattern

Specify the full URI in regular expression. For example,

(http(s)://)*example.com/*/htmls/*.html

Note: In the HTTP response body, HTML sometimes is linked to a certain resource URL. If the resource contains a domain name, then FortiADC will do the fetch according to the fetch-domain setting or the rewrite-domain setting.

Wildcards include * (asterisk) which matches any 0 (zero) or more characters, and ? (question mark) which matches exactly one character. Unlike Unix shells, the / directory separator is not special, and can be matched by either * or ?. The resources are always expanded into their absolute form before expanding.

A wildcard will be matched against the full URL, including any query parameters. For example, you can use "*.jsp*" to match http://example.com/index.jsp?test=xyz.

Resource Control
Origin Domain Patten

Specify the original domain pattern in regular expression in alphanumeric characters. For example, (http(s)://)*.example.com

Note: Valid characters are 0– 9, a–z, A–Z, . (period), : (colon), hyphen (-) and / (forward slash). The FortiADC 4.8.0 release only supports HTTP or HTTPS.

To improve web page performance, PageSpeed will examine and modify the content of the resources referenced on web pages. It does that by fetching those resources using HTTP, according to the URL reference specified on an HTML page.

Rewrite Domain

Specify the fetch domain string. For example, http://www.example.com

Valid characters are 0– 9, a–z, A–Z, . (period), : (colon), hyphen (-) and / (forward slash). The FortiADC 4.8.0 release only supports HTTP or HTTPS.

Fetch Domain

Specify the rewrite domain string. For example, http://www.example.com

Valid characters are 0– 9, a–z, A–Z, . (period), : (colon), hyphen (-) and / (forward slash). The FortiADC 4.8.0 release only supports HTTP or HTTPS.

Creating a PageSpeed configuration

Creating a PageSpeed configuration

A PageSpeed configuration sets the rule(s) that FortiADC follows when rendering web pages. Creating a PageSpeed configuration object involves the following:

  • Specify the inode/file cache limits
  • Choose a PageSpeed profile (Must be configured in advance)
  • Set page control
  • Set resource control

To create a PageSpeed configuration object:

  1. Click Server Load alance > Application Optimization.
  2. Select the Page Speed tab.
  3. Make the entries or selections as described in PageSpeed configuration.
  4. Click Save when done.

PageSpeed configuration

Parameter Description
PageSpeed
Name

Enter a name for the PageSpeed configuration object that you are creating.

File Cache Inode Limit

Specify the maximum number of inodes that can be cached on FortiADC for this virtual server. The default is 10,000. Valid values range from 1 to 100,000.

Note: An inode is a data structure with information about files or directories on a filesystem on Linux or other Unix-type operating systems. It's generated when a filesystem is created. Within a filesystem, every file and directory has a corresponding inode identified by an inode number. Each inode contains the attributes and disk block location(s) of the file's or directory's data, which may include metadata (e.g., access mode, times of last change, modification) and user, ownership, and permission data.

A filesystem has a set number of inodes, which indicates the maximum number of files or directories it can hold. A FortiADC appliance can support up to 100,000 inodes.

Every time you open a file, the kernel of the server reads the file's inode. The more files and directories you have, the more inodes the server uses. And the more inodes the server uses, the more system resources it consumes. So it is always a good practice to try to limit the number of inodes a host has on a shared server. This will prevent it from using all system resources.

To ensure efficient use of its resources, FortiADC cleans its cache every 10 minutes. It cleans the cache only when either of the following conditions is met:

  • The virtual server has reached its set inode cache limit.
  • The virtual server has reached its file size cache limit.

When performing cache clean-up, FortiADC will use the "first-in first-out" (FIFO) principle to remove the oldest cached inodes or files until the cached data is reduced to less than 75% of its set inode- or file-cache limit(s).

File Cache
Size Limit

Specify the maximum file size that can be cached on FortiADC for this virtual server. The default is 128. Value values range from 1 to 512 (MB).

PageSpeed Profile

Select a PageSpeed profile from the list menu.

Note: You must have PageSpeed profiles created before you start to create a PageSpeed rule. For instructions on how to create a PageSpeed profile, refer to Creating PageSpeed profiles

Page Control
Type

Select either of the following page control types:

  • Include — If selected, FortiADC will process Web pages associated with the URI specified below.
  • Exclude — If selected, FortiADC will skip Web pages associated with the URI specified below.
URI Pattern

Specify the full URI in regular expression. For example,

(http(s)://)*example.com/*/htmls/*.html

Note: In the HTTP response body, HTML sometimes is linked to a certain resource URL. If the resource contains a domain name, then FortiADC will do the fetch according to the fetch-domain setting or the rewrite-domain setting.

Wildcards include * (asterisk) which matches any 0 (zero) or more characters, and ? (question mark) which matches exactly one character. Unlike Unix shells, the / directory separator is not special, and can be matched by either * or ?. The resources are always expanded into their absolute form before expanding.

A wildcard will be matched against the full URL, including any query parameters. For example, you can use "*.jsp*" to match http://example.com/index.jsp?test=xyz.

Resource Control
Origin Domain Patten

Specify the original domain pattern in regular expression in alphanumeric characters. For example, (http(s)://)*.example.com

Note: Valid characters are 0– 9, a–z, A–Z, . (period), : (colon), hyphen (-) and / (forward slash). The FortiADC 4.8.0 release only supports HTTP or HTTPS.

To improve web page performance, PageSpeed will examine and modify the content of the resources referenced on web pages. It does that by fetching those resources using HTTP, according to the URL reference specified on an HTML page.

Rewrite Domain

Specify the fetch domain string. For example, http://www.example.com

Valid characters are 0– 9, a–z, A–Z, . (period), : (colon), hyphen (-) and / (forward slash). The FortiADC 4.8.0 release only supports HTTP or HTTPS.

Fetch Domain

Specify the rewrite domain string. For example, http://www.example.com

Valid characters are 0– 9, a–z, A–Z, . (period), : (colon), hyphen (-) and / (forward slash). The FortiADC 4.8.0 release only supports HTTP or HTTPS.