Vikas Tandi
Vikas Tandi

Reputation: 41

Custom Load balancer probe for Azure Webrole is not working as expected for Https endpoint

I am trying to setup custom load balancer probe for azure webrole(2 instances). I made following changes in the ServiceDefinition.csdef file:

<ServiceDefinition>

    <LoadBalancerProbes>
    <LoadBalancerProbe name="MyLoadBalancerProbe" protocol="http" path="/api/infrastructure/healthprobe"/>
    </LoadBalancerProbes>

<WebRole>

...

<Endpoints>
      <InputEndpoint name="Endpoint1" protocol="https" port="443" certificate="mycertificate" />
      <InputEndpoint name="Endpoint2" protocol="http" port="80" loadBalancerProbe="MyLoadBalancerProbe"/>
</Endpoints>

</WebRole>
</ServiceDefinition>

I could see the load balancer probe sending http get request to endpoint "/api/infrastructure/healthprobe" in IIS logs.

When i start sending http status code 403 instead of 200 from one of the instances, i can see all http request from the browser going only other instance but all https requests were still going to both instances.

Then i updated the InputEndpoint for https

<InputEndpoint name="Endpoint1" protocol="https" port="443" certificate="mycertificate" loadBalancerProbe="MyLoadBalancerProbe"/>

Then the custom load balancer probe stop sending any request to both the instances and both http and https request were showing connection time out.

My requirement is that when any of the instance return http status 403 to local probe, both http and https request should not go to that instance. I am not able to figure out what i am doing wrong here.

Thanks in advance

Upvotes: 1

Views: 611

Answers (1)

The LoadBalancerProbe schema does not support 'https' as a protocol - https://msdn.microsoft.com/en-us/library/azure/jj151530.aspx

That would be why the probes stop working.

Besides from testing your certificate, why would you want both probes?

I have not looked in to if you can just change the port of the probe to test your https connectivity - maybe that will work?

-Mikkel

Upvotes: 1

Related Questions