Quantcast
Channel: Azure Networking (DNS, Traffic Manager, VPN, VNET) forum
Viewing all articles
Browse latest Browse all 6513

Web role in VNet subnet - How to load balance endpoint

$
0
0

Hi,

How should I set up my endpoint for session affinity? I run at most 10 instances of my web application web role and the user need to hit the same one based on the 5 tuple hash described on the load balancer documentation pages.

The web roles cloud service is part of a subnet which has access to the service layer. The web role also has a reserved IP.

Here is the .csdef file:

<?xml version="1.0" encoding="utf-8"?><ServiceDefinition name="UI.Main.MainUI.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6"><WebRole name="UI.Main.MainUI" vmsize="Small"><Runtime executionContext="elevated" /><Startup><Task commandLine="Startup/startup.cmd" executionContext="elevated" taskType="background" /></Startup><Sites><Site name="Web"><Bindings><Binding name="Endpoint1" endpointName="Endpoint1" /></Bindings></Site></Sites><ConfigurationSettings><Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" /></ConfigurationSettings><Endpoints><InputEndpoint name="Endpoint1" protocol="http" port="80" loadBalancerDistribution="none"/></Endpoints><Imports><Import moduleName="RemoteAccess" /><Import moduleName="RemoteForwarder" /><Import moduleName="Caching" /></Imports><LocalResources><LocalStorage name="DiagnosticStore" sizeInMB="20000" cleanOnRoleRecycle="false" /></LocalResources></WebRole></ServiceDefinition>

And here is the cloud configuration:

<?xml version="1.0" encoding="utf-8"?><ServiceConfiguration serviceName="UI.Main.MainUI.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2015-04.2.6"><Role name="UI.Main.MainUI"><Instances count="1" /><ConfigurationSettings><Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=storagename;AccountKey=mykey==" /><Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /><Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="adminname" /><Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="encryptedpassword" /><Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2016-09-15T23:59:59.0000000+02:00" /><Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" /><Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{&quot;caches&quot;:[{&quot;name&quot;:&quot;default&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0}]}" /><Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" /><Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" /><Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mystoragename;AccountKey=myaccountkey==" /></ConfigurationSettings><Certificates><Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="here is a thumbprint" thumbprintAlgorithm="sha1" /></Certificates></Role><NetworkConfiguration><VirtualNetworkSite name="AzureVNetWE" /><AddressAssignments><InstanceAddress roleName="UI.Main.MainUI"><Subnets><Subnet name="PrivateFrontend" /></Subnets></InstanceAddress><ReservedIPs><ReservedIP name="PrivateFrontendIP" /></ReservedIPs></AddressAssignments></NetworkConfiguration></ServiceConfiguration>


Viewing all articles
Browse latest Browse all 6513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>