Fortinet white logo
Fortinet white logo

User Guide

Virtual Server Configuration Example: Load-Balancing by Geolocation

Virtual Server Configuration Example: Load-Balancing by Geolocation

This page highlights additional information on the Geolocation load-balancing use case. For general information on virtual server pools and configuring load-balancing, refer to Virtual Server Pool.

The GEO load balancing method directs traffic based on the geographic location of the client, typically using the source IP address. This method helps route users to the nearest or most appropriate regional endpoint, improving performance and supporting data residency compliance.

Geolocation matching is based on the source IP address relative to the data center location specified in the connector associated with the virtual server. The matching follows this order:

  1. Region (e.g., state or province)

  2. If no region match, fall back to country

  3. If no country match, fall back to continent

  4. If no continent match, use the Alternate load balancing method.

  5. If the Alternate load-balancing method fails to select a server, use the WEIGHT (weighted round-robin) method.

Example: One virtual server is configured in US–California.

  • A query from a source IP in Canada will also match this virtual server if no other virtual server exists anywhere in the US.

  • A query from a source IP in US–Oregon will match this virtual server if no other virtual server exists in US–Oregon.

Configure load balancing by geolocation

  1. Create FQDN in GSLB Services and create an FQDN member.

    If your deployment requires strict geographical matching, we recommend enabling the Respond Single Record option under FQDN settings.

  2. Create a new Virtual Server Pool. For the Preferred LB Method, select GEO.
  3. Add virtual servers to your pool. Traffic will be routed to the added virtual servers based on the selected load-balancing method.
  4. The FQDN will respond to the DNS query according to the virtual server’s location in Connectors and the DNS query’s source IP.

Virtual Server Configuration Example: Load-Balancing by Geolocation

Virtual Server Configuration Example: Load-Balancing by Geolocation

This page highlights additional information on the Geolocation load-balancing use case. For general information on virtual server pools and configuring load-balancing, refer to Virtual Server Pool.

The GEO load balancing method directs traffic based on the geographic location of the client, typically using the source IP address. This method helps route users to the nearest or most appropriate regional endpoint, improving performance and supporting data residency compliance.

Geolocation matching is based on the source IP address relative to the data center location specified in the connector associated with the virtual server. The matching follows this order:

  1. Region (e.g., state or province)

  2. If no region match, fall back to country

  3. If no country match, fall back to continent

  4. If no continent match, use the Alternate load balancing method.

  5. If the Alternate load-balancing method fails to select a server, use the WEIGHT (weighted round-robin) method.

Example: One virtual server is configured in US–California.

  • A query from a source IP in Canada will also match this virtual server if no other virtual server exists anywhere in the US.

  • A query from a source IP in US–Oregon will match this virtual server if no other virtual server exists in US–Oregon.

Configure load balancing by geolocation

  1. Create FQDN in GSLB Services and create an FQDN member.

    If your deployment requires strict geographical matching, we recommend enabling the Respond Single Record option under FQDN settings.

  2. Create a new Virtual Server Pool. For the Preferred LB Method, select GEO.
  3. Add virtual servers to your pool. Traffic will be routed to the added virtual servers based on the selected load-balancing method.
  4. The FQDN will respond to the DNS query according to the virtual server’s location in Connectors and the DNS query’s source IP.