Open Grieves

Open Grieves

Assimilate quickly!

You must comply!

Azure Load Balancer json with session persistence

Out of troublePosted by Magnus Glantz 2017-02-13 12:33:25
It took some time for me to find out that to get session persistence, you use the variable 'loadDistribution' and to get Client IP session persistence, you use 'sourceIP' as value.

So.. yeah.. the load balancers rules would in json look something like below:

"loadBalancingRules": [{
"name": "myLBrules",
"properties": {
"frontendIPConfiguration": {
"id": "[variables('myLbFrontEndConfigId')]"
"backendAddressPool": {
"id": "[variables('myLbBackendPoolId')]"
"protocol": "Tcp",
"loadDistribution": "sourceIP",
"idleTimeoutInMinutes": 30,
"frontendPort": 8443,
"backendPort": 8443,
"probe": {
"id": "[variables('myLb8443ProbeId')]"

If you want something more cut and paste friendly, have a look here:

  • Comments(0)//