Solution | Session persistence, also known as sticky sessions, ensures that subsequent requests belonging to the same user session are forwarded to the same real server instead of being load-balanced to a different backend server. When configuring a FortiGate virtual server with the TCP server type, the Persistence option is not available in the GUI and cannot be configured.
Example:
config firewall vip
edit "TCP-TYPE"
set type server-load-balance
set server-type tcp
set extip x.x.x.x
..
end
next
end
When the server type is selected as TCP, there will be no 'set persistence <>' command available, and this is expected. The same setup will also not be available for UDP and IP types. HTTP cookie persistence will work for HTTP and HTTPS server types, and the rest will use persistence with the SSL session ID.
HTTP cookie-based persistence: works only with Layer-7 HTTP/HTTPS because FortiGate can inject and read a cookie in the HTTP headers. SSL session ID-based persistence: It works with SSL-terminated protocols (HTTPS, IMAPS, POP3S, SMTPS, SSL) because the FortiGate can track the SSL/TLS session ID. Pure TCP / UDP / IP are Layer-4 (or Layer-3) and have no application-layer identifier that FortiGate can use for stickiness. Therefore, the set persistence command is not present.
Related articles:
|