The load balancer distributes traffic by a simple hashing algorithm across all endpoints that are considered Ready/Healthy. The load balancer support two alternative methods for deciding on the status of the instances that belong to a cloud service role. The two methods are: Using the Guest Agent Responds with HTTP 200 OK only when instance is Ready. It does not monitor the w3wp.exe process that the websites run in. NOTE: When using the guest agent probe, the role itself (WaIISHost.exe) may be running just fine and reporting Ready (thus receiving incoming LB traffic) while the website (w3wp.exe) may be failing and returning HTTP 50x errors to end users. This exposes one of the disconnects between the role and w3wp in that the role and guest agent don’t actually know anything about w3wp status or health, even though w3wp health is what matters for the role instance availability. Load Balancer Probe Overrides the Guest Agent. Checks for HTTP 200 OK every 15s *, and times out if no response is received in 31s * (*=default settings). NOTE: With the custom LB probe, the role itself may be unhealthy or in the process of shutting down while the website is still returning an HTTP 200, thus receiving new incoming connections even when the role is in a potentially bad state or about to be shut down. This exposes the other disconnect between the role and w3wp in that the role doesn’t directly coordinate lifecycle with w3wp. Neither method by itself will provide a full view of the health of the role. A better approach is to implement a combined approach: The Guest Agent is used to monitor overall role health and handle life cycle events like stops. Important: No load balancer probe is implemented directly. Implement a custom RoleEnvironment.StatusCheck event handler in the WaIISHost.exe. This can probe a health probe for the application and signal its health status back to the Guest Agent. This gives the benefit of both worlds of the Azure controlled lifecycle plus a custom HTTP probe. 5.2.1.1 Load Balancer Probing
The load balancer distributes traffic by a simple hashing algorithm across all endpoints that are considered Ready/Healthy. The load balancer support two alternative methods for deciding on the status of the instances that belong to a cloud service role. The two methods are: Using the Guest Agent Responds with HTTP 200 OK only when instance is Ready. It does not monitor the w3wp.exe process that the websites run in. NOTE: When using the guest agent probe, the role itself (WaIISHost.exe) may be running just fine and reporting Ready (thus receiving incoming LB traffic) while the website (w3wp.exe) may be failing and returning HTTP 50x errors to end users. This exposes one of the disconnects between the role and w3wp in that the role and guest agent don’t actually know anything about w3wp status or health, even though w3wp health is what matters for the role instance availability. Load Balancer Probe Overrides the Guest Agent. Checks for HTTP 200 OK every 15s *, and times out if no response is received in 31s * (*=default settings). NOTE: With the custom LB probe, the role itself may be unhealthy or in the process of shutting down while the website is still returning an HTTP 200, thus receiving new incoming connections even when the role is in a potentially bad state or about to be shut down. This exposes the other disconnect between the role and w3wp in that the role doesn’t directly coordinate lifecycle with w3wp. Neither method by itself will provide a full view of the health of the role. A better approach is to implement a combined approach: The Guest Agent is used to monitor overall role health and handle life cycle events like stops. Important: No load balancer probe is implemented directly. Implement a custom RoleEnvironment.StatusCheck event handler in the WaIISHost.exe. This can probe a health probe for the application and signal its health status back to the Guest Agent. This gives the benefit of both worlds of the Azure controlled lifecycle plus a custom HTTP probe. 5.2.1.1 Load Balancer Probing
Hybrid%20Cloud%20-%20Azure%20Reference%20Architecture%20-%20Partner.docx