Docs
Preferred Agents

Preferred Agents

How to select a specific agent for your requests.

Introduction

Our API uses cloud microservices called "agents" to generate WebSocket URLs & return the responses to you. In order to provide enterprise customers high availability, we have tons of agents running in different regions around the world.

All paid plans have the ability to select a preferred agent. When you specify a preferred agent, the sign API will first try your chosen agent before picking a random public agent if it is not available. The reason this is locked behind a paywall is simply that bypassing the round-robin behaviour normally available to the public increases the load on the specified agent, which can lead to performance issues.

When selecting a preferred agent, you must include a minimum of 3, such that requests can be randomly distributed across them.

How to Select a Preferred Agent

Selecting a preferred agent is as simple as including the preferred_agent_ids parameter when making a request to the Sign API.

The following two routes allow you to specify a preferred agent:

  • GET - https://tiktok.eulerstream.com/webcast/fetch?room_id=1234567890&preferred_agent_ids=rn-dal-1-a,rn-nyc-1-a,rn-chi-1-a
  • POST - https://tiktok.eulerstream.com/webcast/sign?preferred_agent_ids=rn-dal-1-a,rn-nyc-1-a,rn-chi-1-a

Available Agents

You can access the list of available agents by making a request to the /webcast/agents endpoint:

All agents in the "public" section are fair game. Enterprise users can also use the "enterprise" agents, which are maintained exclusively for enterprise customers.