Forum Discussion
Tayyab Suhail
Apr 21, 2020Copper Contributor
Azure Application Gateway with App Service
Hi Community,
Can someone help me in understanding that how scalability is handled by APG on app service level. Let's take an example, we have an app service deployed and running with auto-scale enabled and the app service is configured with APG. How APG get to know how many instances of the app service are running considering the auto scale is enabled on the app service level.
Regards,
Tayyab
Tayyab Suhail, when you configure App Service as a backend for AppGW, you are providing its URL, not the actual references to the App Service Plan instances. AppGW only knows a Web App URL, as much as any other HTTP client. Therefore, App Service scaling operations are transparent to AppGW, no matter you have 1 or 10 instances.
- hspinto
Microsoft
Tayyab Suhail, when you configure App Service as a backend for AppGW, you are providing its URL, not the actual references to the App Service Plan instances. AppGW only knows a Web App URL, as much as any other HTTP client. Therefore, App Service scaling operations are transparent to AppGW, no matter you have 1 or 10 instances.
- Tayyab SuhailCopper Contributorhspinto, Thanks for taking out time and adding details to it. It makes sense what you are saying so i am wondering that APG provides session affinity feature that routes request coming from same client to the same instance of the application. In case there are 10 app service instance running how this session affinity thing is taken care considering the APG does not about how many instances are running and simply direct the traffic to the Web APP URL.
I hope i was able to communicate properly what i wanted to ask.
Many Thanks,
Tayyab Suhail- hspinto
Microsoft
Tayyab Suhail, Azure App Service honors ARRAffinity, so, even with AppGW in front of it, App Service "load balancer" should keep sending session-affinity-based requests to the same backend instance. However, take into account that App Service may be responding to requests with a different "Location" header, which will break session affinity. Read this article for a description of the problem and possible solutions.