Skip to main content

Global Load Balancing for Agents

ngrok's GSLB automatically improves the performance and resiliency of your ngrok agents, agent SDKs and the Kubernetes Controller. Agents automatically connect to ngrok's geographically-closest healthy point of presence.

Acceleration

Similar to endpoints, when an ngrok agent connects, DNS resolution returns the IPs of the closest ngrok point of presence. Connecting to the closest ngrok point of presence reduces agent initialization time and also reduces the latency of connections that are routed to that agent.

Losing a Point of Presence

If an ngrok point of presence fails, health checks automatically detect that failure and update our DNS resolution such that agents will attempt to connect to the next-closest healthy point of presence.

The ngrok agent connects to a single region at a time. If you want the ngrok agent to simultaneously connect to multiple regions, you must instead run multiple ngrok agents and explicitly disable agent GSLB.

Disabling GSLB in the Agent

You should always prefer to allow the ngrok agent to use GSLB and connect to the closest point of presence. However, the ngrok agent does support disabling GSLB and explicitly choosing which point of presence to connect to.

If you wish to configure the agent to use a specific point of presence you may do so with the following configuration:

Loading…

Legacy Agent Behavior

Beginning with the ngrok v3 agent, the agent uses GSLB to connect to the lowest-latency point point of presence. Prior to that, v2 ngrok agents would always connect to the US region by default.