Agent scripting api timing out during high concurrency load test

Trying to make sense of why the /api/v2/communications/agent-scripting endpoint starts returning 504 gateway timeouts when we push our jmeter script to 150 concurrent virtual agents.

we are running the load test from our singapore office (asia/singapore timezone) using a custom java http sampler to fetch script content for each simulated call. the initial ramp-up to 50 concurrent users works fine with avg response times around 200ms. however, once we hit 100+ threads, the api seems to choke.

error details:

  • endpoint: get /api/v2/communications/agent-scripting
  • error: 504 gateway timeout
  • frequency: starts at ~80% of requests under load
  • environment: genesys cloud us-east-1 edge

we have verified that the script ids are valid and cached locally in the jmeter test plan to avoid redundant lookups, but the api call is still triggered per session initialization. is there a known rate limit or connection pool issue specifically for this endpoint during peak hours? we noticed the logs show a spike in cpu usage on the load generator, but the api errors persist even when we reduce the generator load.

any insights on how to optimize this or if there is a specific header we should be including to handle this better?