Search code examples
azure-web-app-service

For a scaled out Azure app service, is there a way to hit a specific instance?


I have my app server set to have 2 servers (testing scaling out). Is there a way via an IP address to explicitly hit one of the servers for a request?

Or does that make no sense as it is load balancing incoming requests and so it will then send subsequent requests to either server?


Solution

  • There is no way to hit a specific instance of a scaled-out Azure App Service via an IP address. Incoming requests are load balanced across all instances, and subsequent requests from a client may be sent to a different instance. However, you can use Azure Traffic Manager or Azure Front Door to route traffic to certain instances based on location or performance.

    OR

    You can use sticky sessions to ensure that subsequent requests from a client are sent to the same instance that served the initial request. This can be configured in the App Service settings.

    Ref to below link for more help:

    Manage an App Service Environment

    Common web application architectures - Traditional "N-Layer" architecture applications