Fortinet black logo

LB commands

LB commands

LB commands can be used in HTTP events.

LB:routing(“cr-name”)

Force current HTTP transaction to route to specific content routing.

Return value is Boolean. If the policy doesn’t have content routing or cannot find the specific content routing, return false. If routing successes, return true.

LB:persist(“key”)

LB:persist(“key”, timeout)

Use the key string to do persistence. The type of the server pool’s persistence must be set to scripting, otherwise the function has no effect.

If argument timeout doesn’t exist, use the default timeout in the persistence of the server pool.

If called in HTTP_REQUEST, the system will use the key to search the persistence table. If found, do persistence; If no found, insert key to the persistence table.

If called in HTTP_RESPONSE, the system will insert the key string to the persistence table.

LB commands

LB commands can be used in HTTP events.

LB:routing(“cr-name”)

Force current HTTP transaction to route to specific content routing.

Return value is Boolean. If the policy doesn’t have content routing or cannot find the specific content routing, return false. If routing successes, return true.

LB:persist(“key”)

LB:persist(“key”, timeout)

Use the key string to do persistence. The type of the server pool’s persistence must be set to scripting, otherwise the function has no effect.

If argument timeout doesn’t exist, use the default timeout in the persistence of the server pool.

If called in HTTP_REQUEST, the system will use the key to search the persistence table. If found, do persistence; If no found, insert key to the persistence table.

If called in HTTP_RESPONSE, the system will insert the key string to the persistence table.