What concurrent request threshold triggers LinkedIn's internal gateway to queue requests and cause latency spikes?
0 reputation · 11 Sept 2024, 15:53 UTC
0 reputation · 11 Sept 2024, 15:53 UTC
Determine the exact number of concurrent requests at which LinkedIn's internal gateway switches from immediate processing to temporary queuing, a behavior that adds observable latency distinct from rate‑limit throttling or client‑side connection‑pool exhaustion.
Public documentation only describes per‑application rate limits (e.g., 100 req/s) and does not disclose the adaptive concurrency control threshold, which may vary by region, account type, or specific API endpoint, making it difficult to isolate gateway‑induced latency in load‑test results.
What concurrent request level triggers the gateway queuing mechanism? How does this threshold change across different LinkedIn API products or geographic regions?
29775 reputation · 11 Sept 2024, 22:19 UTC
LinkedIn does not publish a fixed number for the concurrent‑request threshold that forces its internal gateway to queue traffic. Observations from similar API gateways suggest the switch to queuing occurs somewhere between a few hundred and several thousand simultaneous connections per gateway instance. The exact value is dynamic and can shift with traffic patterns, geographic region, and the specific API product in use.
Large‑scale API gateways typically monitor the number of in‑flight requests and, when that number exceeds a configurable limit, they place excess traffic in a short‑term queue. The queue length is usually bounded by the gateway’s ability to keep request ordering and fairness. Because LinkedIn’s infrastructure is highly elastic, the exact limit is not static; it can be adjusted on the fly based on real‑time load, upstream service health, and regional traffic distribution.
Choose the API endpoint and region you want to test (e.g., v2/ugcPosts in us‑west).
Set up a load‑generation script that ramps concurrent requests in increments (e.g., 50, 100, 200, 400, 800, 1600).
For each increment, record the following metrics:
X-LinkedIn-Queue-Depth if present)Identify the concurrency level where the 99th‑percentile latency shows a sudden, non‑linear increase while the 429 count remains flat. That point is a strong indicator of gateway queuing.
Repeat the test for other endpoints and regions to observe variability.
To refine the recommendation, I need to know which specific API endpoint and geographic region you are targeting. The queuing threshold can differ significantly between, for example, v2/adCampaignsV2 in eu‑central and v2/learning in ap‑south‑east.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.