An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Thank you for reaching out to Microsoft Q&A.
Azure API Management does not have any inherent issues with routing traffic when multiple APIs use the same hostname, and it does not randomly forward requests to an incorrect backend due to networking or connection pooling. Routing in APIM is deterministic and is strictly controlled by API configuration, operation matching, and applied policies. When traffic appears to be routed to the wrong backend in a seemingly random manner, the issue is almost always related to policy inheritance, backend resource reuse, API path or operation overlap, or API revision/version configuration. Although Application Insights may show the expected backend URL, an inherited or overridden policy can still redirect traffic at runtime, which makes the behavior appear intermittent and difficult to reproduce.
Refer below points to resolve this issue or this is the workaround
Verify policy scope and inheritance
Ensure that the <set-backend-service> policy is applied only at the intended API or operation level. Check for the same policy at the global (All APIs), product, or parent API level, as policies applied there are inherited by all APIs and can cause traffic to be routed to an unintended backend.
Use dedicated backend resources per API
Even if multiple APIs ultimately point to the same backend host, define separate backend resources in APIM (for example, one backend for erpservice and another for configuratorservice). This avoids accidental reuse or overrides of backend configuration across APIs.
Validate API base paths and operation definitions
Confirm that each API has a unique base path and that there are no overlapping or wildcard (/*) operations that could match requests for multiple APIs. Overlapping paths can cause APIM to select an unexpected API or operation.
Check API revisions and versions
Make sure only the intended API revision or version is active and receiving traffic. If multiple revisions are enabled, traffic may be split, leading to different backend routing behavior.
Enable APIM diagnostic logs for backend requests
Turn on API Management diagnostic logging (BackendRequest/BackendResponse). These logs show the exact backend URL used for each request and are the most reliable way to confirm which backend APIM is actually calling.