Getting started with Azure Application Gateway

Finally something Ive been waiting for to arrive!  Microsoft announced yesterday something called Azure Application Gateway, which is a layer 7 HTTP based load balacing feature. Which has many more persistency features and features like SSL offloading which makes certificate management easier. And with the SSL offloading feature we can remove SSL processing from the virtual machines or applications using SSL in the backend, since Application Gateway has enhanced SSL processing.

Important to note however is that this feature is built upon IIS/AAR.

Application Gateway

Now Azure already has some load balancing capabilities, such as Traffic Manager which is a DNS based load balancing and endpoint load balancing which is more of layer 4 load balancing and has limitied capabilities but of course is a free feature, and traffic manager is billed for amount of DNS queries.

As of now it is only available using the latest Azure PowerShell version, but moving forward it will become available in the portal and the SDK as part of ARM for instance.

To get started we need to create a Application Gateway which can done with the PowerShell command

New-AzureApplicationGateway –Name AppGW –Subnets 10.0.0.0/24 –vNetname vNet01

image

And we can now see that the AppGW is created but still hasent been started

image

Next we need to do the configuration, this is by using an XML file where the declare all the speicifcs like external ports, what kind of protocol and if for instance cooke based persistency should be enabled

The XML file should look like this

<?xml version=”1.0″ encoding=”utf-8″?>
<ApplicationGatewayConfiguration xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/windowsazure”>
    <FrontendPorts>
        <FrontendPort>
            <Name>FrontendPort1</Name>
            <Port>80</Port>
        </FrontendPort>
    </FrontendPorts>
    <BackendAddressPools>
        <BackendAddressPool>
            <Name>BackendServers1</Name>
            <IPAddresses>
                <IPAddress>10.0.0.5</IPAddress>
                <IPAddress>10.0.0.6</IPAddress>
            </IPAddresses>
        </BackendAddressPool>
    </BackendAddressPools>
    <BackendHttpSettingsList>
        <BackendHttpSettings>
            <Name>BackendSetting1</Name>
            <Port>80</Port>
            <Protocol>Http</Protocol>
            <CookieBasedAffinity>Enabled</CookieBasedAffinity>
        </BackendHttpSettings>
    </BackendHttpSettingsList>
    <HttpListeners>
        <HttpListener>
            <Name>HTTPListener1</Name>
            <FrontendPort>FrontendPort1</FrontendPort>
            <Protocol>Http</Protocol>
        </HttpListener>
    </HttpListeners>
    <HttpLoadBalancingRules>
        <HttpLoadBalancingRule>
            <Name>HttpLBRule1</Name>
            <Type>basic</Type>
            <BackendHttpSettings>BackendSetting1</BackendHttpSettings>
            <Listener>HTTPListener1</Listener>
            <BackendAddressPool>BackendPool1</BackendAddressPool>
        </HttpLoadBalancingRule>
    </HttpLoadBalancingRules>
</ApplicationGatewayConfiguration>

Note: under HTTPLoadBalancingRules there is currently only support for Basic (Which is the equivilant of Round Robin at the moment. After we have altered our XML config we can upload it.

image

After you have uploaded the rules we can start the gateway. Note however this might take a long time before it actually starts operating!

image

Now even thou this might become a nice feature it is still pretty limited, compared to the other options we have in Azure. Hopefully we have just seen the beginning of this feature and how it will integrate with Traffic Manager in the future will make it even more awesome!

Leave a Reply

Scroll to Top