We have 2 Azure VMs running IIS and hosting 50+ .Net web applications (Webforms, MVC, WCF & ASMX). Both of the 2 VMs are identical and all sites are configured using a hostname ([subdomain].domain.com) on port 443 and requiring SSL. 11 of these sites are legacy and require afinity because of session state, all other sites don't and can be randomly loadbalanced.
All of the sites run perfectly on each of the 2 servers.
Now we would like to put an Application Gateway in front of the 2 VMs to provide loadbalancing, https redirect, WAF, ...
Can we configure 1 Application Gateway to do all this and make sure the affinity is only valid for those 11 sites and not for all of them and also do the https redirect? Or do we need to configure 2 Application Gateways, 1 for the 11 affinity-dependent sites and 1 for the remaining and then have dns point to 1 of the Gateways?
So you should be able to deploy an Application Gateway and configure to make your setup work.