Skip to main content

Region pinning

Learn how to isolate LiveKit traffic to a specific region.

Overview

Region pinning restricts LiveKit Cloud network traffic to a specific geographical region. Use it to control where signaling and media are routed, for example to keep traffic within a single region.

There are two options for restricting traffic to a specific region:

  • Protocol-based region pinning

    Signaling and transport protocols include region selection. Use this option with LiveKit realtime SDKs.

  • Region-based endpoint

    Clients connect to a region-specific endpoint. Use this option for telephony applications. To learn more, see Region pinning for telephony.

Agent deployment regions

Region pinning only applies to LiveKit Cloud network traffic. To manage the regions where your agents themselves are deployed, see Agent deployment regions.

Protocol-based region pinning

In protocol-based region pinning, region selection information is embedded in the initial signaling and transport messages. When pinning is enabled, if the initial connection is routed to a server outside the allowed regions, the request is rejected. The client then retries the connection using a server in one of the pinned regions.

Region pinning is available for customers on the Scale plan  or higher.

Protocol-based region pinning only works with LiveKit realtime SDKs

For SIP requests, the server rejects the connection and doesn't retry it. Use region-based endpoints for SIP.

When to use protocol-based region pinning

Use protocol-based region pinning when you connect with LiveKit realtime SDKs and need to keep traffic within a specific region.

Region pinning controls only where network traffic is routed, and it's one of several controls involved in restricting a project to a single region. To keep realtime traffic in the EU, pin your project to the eu region. To configure EU data residency across data storage, agent hosting, telephony, inference, recordings, and media transport, see EU data residency.

Enable protocol-based region pinning

LiveKit must enable region pinning for your project. To request region pinning, sign in to LiveKit Cloud  and select the Support option in the menu.

Considerations

Protocol-based region pinning gives you control over which region handles traffic, but it has some tradeoffs:

  • No automatic failover: When you enable region pinning, traffic doesn't automatically fail over to the nearest region if the pinned region becomes unavailable.
  • Not required for EU data residency: Region pinning isn't required to meet EU data residency requirements. See EU data residency for how media transport pinning fits into an EU deployment.
  • Potentially higher latency: Restricting traffic to a single region can increase latency for users outside that region.

Available regions

Protocol-based region pinning uses the region group codes, such as us, eu, and india. For the full list of supported region groups, including locations and in-region redundancy, see Region groups for protocol-based region pinning.

Additional resources

The following additional topics provide more information about regions and region pinning.