When an instance is deemed unhealthy and restarted automatically, the ARRAffinity parameter (used for session affinity) may cause issues. This parameter typically directs subsequent requests from the same user to the same instance. If the instance is unhealthy and replaced, the user's session might fail because the ARRAffinity cookie still points to the old instance. This could result in errors or even log the user out.
To identify which users are accessing the website on different instances using Application Insights, you would need to customize your telemetry. By adding custom properties to your telemetry data, such as the instance name or ID, you can track which instance is handling a specific user's requests. This requires some configuration in your application code to include the instance information in the telemetry sent to Application Insights