Geo-distributed Azure App's vs One-region - azure

I'm using Azure App Service to setup my website. I have 2 Azure App Service instances and 2 Azure SQL.
1 App Service instance is in the Central US and 1 App Service instance Central India. 1 SQL instance is in the Central US and the other is in Central India.
I use Traffic Manager to route traffic to either region.
What confuses me is that, when I access the Indian server directly the page seems to load at pretty much the same speed as the server in the US.
And both seem to load relatively quickly. Around 250-350ms each to load a page with no styling that performs one database query.
Does this mean that deploying in multiple regions is overkill? Would I be better deploying a larger instance in a single region?

A multi-region architecture can provide higher availability than deploying to a single region.
If a regional outage affects the primary region, you can use Traffic Manager to fail over to the secondary region.
This architecture can also help if an individual subsystem of the application fails.
Also, when you configure you Traffic Manager, create a health probe endpoint that reports the overall health of the application and use this endpoint for the health probe.
The endpoint should check critical dependencies such as the App Service apps, storage queue, and SQL Database.
Otherwise, the probe might report a healthy endpoint when critical parts of the application are actually failing.
For more details, you could refer to this article.

Related

How to achieve High Availability for multiple App Services in Azure

I have 2 same Web App and I have added them to application gateway's backed pool in Azure.
I have one domain for the application Gateway and I can bind only one web app to it.
Is there any way to add 2 Web App with the same domain of application gateway?
If not, then any other way to achieve high availability for Web Apps?
I want that if one Web App is not reachable, the traffic should go to other Web App. The Web Apps are not stateless and therefore ruled out the use of Traffic Manager Profile due to lack of Session Persistence.
I have gone through various questions mentioned below on the same topic, but none is related or have satisfactory solution.
- DNS: High Availability with Azure Web Apps + Traffic Manager
- Achieving High Availability using Azure Traffic Manager
- Is it possible that one domain name has multiple corresponding IP addresses?
For App Service, Application Gateway cannot be used for Load balancing Purpose. You can use Application Gateway as WAF. In your scenario, as Thomas stated, AFD would be the best option.
You can leverage the priority option which can be configured while adding App Service to the backend pool to achieve your ask.
You can assign priorities to your different backends when you want to use a primary service backend for all traffic, and provide backups in case the primary or the backup backends are unavailable.
In this case, when the probe to the Primary goes down, then the traffic will be routed to the secondary Web App.
Reference: https://learn.microsoft.com/en-in/azure/frontdoor/front-door-routing-methods

should I choose azure application gateway or load balancer or front door or traffic manager?

I have a SaaS web app developed with Angular 8 and Asp.net Core Web API. I have deployed web api to a azure web app and deployed angular front-end web app to another azure web app as well.
The users are from China and Australia and other countries. I want to have region load balance like Chinese users uses web app on china azure region and australian users use Australian azure region web app so that it has best performance. Azure SQL DB will be in one place (in australia).
In addition, i want to prevent attacking to web front app and web api like d-dos, web scraping and SQL injection. For web scraping, i want to add access rate limitation from one ip.
Can you please advise what service i should use? I saw the blog talking about azure application gateway, azure load balancer, azure front door and azure traffic manager. It is a bit confusing to me. I need a best practise based on my this real world scenario. Should I use one of the service or should I use multiple services?
Based on your requirement:
Since the Backend Resource is Web App, you can ignore Load balancer (Layer 4) where you can only add VMs or VMSS
Your another requirement is WAF, and it is only available in AFD and AppGW. But you can use Traffic Manager as first Tier Load balancing and have AppGW in the different regions to provide high resilience.
As you want users from specific country to reach nearest backend resource, it seems like, the best solution for you is AFD.
AFD is a global Load balancer. It has WAF capability. It can Cache the data and provide quicker responses(CDN functionality). AFD uses an intelligent probing mechanism, through which it chooses the endpoint which is closer to the client who is making the request.
Hope this helps.

can we use load balancer on a two app services in azure

I am creating a network with 2 app services, containing 2 slots each
I know the load balancers are designed to work with VM's, but I am wondering if it is possible to place a load balencer on these 2 app services to balance the load between them, Is it possible to do so??
When you Scale your Web App you add instances of your current pricing tier and Azure deploys your Web App package to each of them.
There's a Load Balancer over all your instances, so, traffic is automatically load balanced between them. You shouldn't need a Virtual Machine for this and you don't need to configure any extra Traffic Manager.
You may want to refer: scale your app in Azure App Service for more details.
but I am wondering if it is possible to place a load balencer on
these 2 app services to balance the load between them, Is it possible
to do so??
According to your description, maybe you are looking for Azure application gateway(layer 7).
Azure application gateway works at the application layer (Layer 7 in the OSI network reference stack). It acts as a reverse-proxy service, terminating the client connection and forwarding requests to back-end endpoints.
Azure application gateway support HTTP, HTTPS and Websockets.
Here is the features offered by each service:
More information about Application gateway, please refer to this article.
Maybe little late but I guess this what you are looking at
Scale Out- A scale out operation is the equivalent of creating multiple copies of your web site and adding a load balancer to distribute the demand between them. When you scale out a web site in Windows Azure Web Sites there is no need to configure load balancing separately since this is already provided by the platform.
https://azure.microsoft.com/en-us/blog/scaling-up-and-scaling-out-in-windows-azure-web-sites/

Umbraco multisite (around 30 sites) in a single instance along with flexible load balancing in Azure

We have a new requirement, summary follows,
Around 30 sites to be developed.
Should use Umbraco.
All the sites should need have a common Umbraco backend.
Single SQL DB.
Some of the sites will be bilingual.
Load balancing architecture required.
We did the POC for the same with 3 sites in a single instance of umbraco by adding root nodes and assigning proper host name, permissions etc and it worked fine.
But in the real case, will it work smoothly ?
We checked the following article regarding flexible load balancing in Umbraco and planned to move with Azure as it is mentioned as the first choice in the article here.
Is anyone has any similar kind of experience ?
Please share, your help would be greatly appreciated.
AFAIK, Azure Web Apps support Built-in autoscale and load balancing. I assumed that web apps leverage Application Request Routing. ARR Affinity is enabled on your Azure App Service by default. This means that if you are running multiple instance of your App Service, clients will be directed to the same instance for each request. For more details, you could refer to here.
Also, you could leverage Traffic Manager with your azure web app for load balancing, which could distribute the traffic to your web app endpoints in different datacenters (global route traffic).
Here are some tutorials, you could refer to them:
Create a Traffic Manager profile
Scale up your app by changing the pricing tier, then you could get more CPU, memory, disk space, etc. For more details, you could refer to Scale up your pricing tier.
Scale out your app to multiple instances manually or automatically based on your configured performance peaks. For more details, you could refer to Scale instance count manually or automatically.

I want to load balance my azure website

I have my website (abc.azurewebsites.net) hosted to Azure Web Apps using Visual Studio.
Now after 1 month I am facing problems with traffic management. My CPU is always 90 - 95% as the number of requests is too high.
Does anyone know how to add Traffic Management in this web app without changing the domain abc.azurewebsites.net? Is it hard coded in my application?
I thought of changing the web app to a Virtual Machine but now as it's already deployed I am scared of domain loss.
When you Scale your Web App you add instances of your current pricing tier and Azure deploys your Web App package to each of them.
There's a Load Balancer over all your instances, so, traffic is automatically load balanced between them. You shouldn't need a Virtual Machine for this and you don't need to configure any extra Traffic Manager.
I can vouch that my company is using Azure Web Apps to manage more than 1000 concurrent users making thousands of requests with just 2-3 instances. It all depends on what your application does and what other resources does it access too, if you implemented or not a caching strategy and what kind of data storage you are using.
High CPU does not always mean high traffic, it's a mix of CPU and Http Queue Length that gives you an idea of how well your instances are handling traffic.
Your solution might implementing a group of things:
Performance tweak your application
Add caching strategies (distributed cache like Azure Redis is a good option)
Increase Web App instances by configuring Auto-Scaling based on HTTP Queue Length / CPU.
You should not have to change your domain to autoscale a Web App, but you may have to change your pricing tier. Scaling to multiple instance is available at Basic pricing tier, and autoscaling starts at Standard tier. Custom domains are allowed at these levels but you don't have to change your domain if you don't want to.
Here is the overview of scaling a web app https://azure.microsoft.com/en-us/documentation/articles/web-sites-scale/
Adding a Virtual Machine (VM) is very costly as compared to adding instance. On top of it, Redundancy (recommended) for the VMs, adding NIC etc will blow up the cost. Maintenance is another challenge. PAAS (webApp etc) is always a better option than IAAS.
Serverless offerings like Azure Functions can also be thought of. They support http trigger and scale up really well.

Resources