Azure availability zone for web api App service - azure

How does Azure availability zone work? For example I have set up 3 web api as app service, I need to ensure that whenever 1 of the API was down, It will redirect to the next available service.
Ex:
Main API - Down
Secondary API - Up
Tertiary API - Up
Expected: Calls to Main API will be redirected to next available (Secondary, or Tertiary if Secondary was also down)

AZ support for App Services (the multi tenant offering) is actually just offered since yesterday: https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html
Follow that guide how to enable it. Basically you need to run at least 3 instances in the app services plan and the platform will make sure those are spread out over different Zones.

Related

Is it possible to make API calls from azure web jobs?

My question is about make API request from azure web jobs.
I have created azure Apps service for my web application (MVC C#).I have one API that need to run once in a day.I found one component in azure namely Azure Job which is paid one.Later I get to know about web jobs in my same Apps Services which not need to pay anything more, but I am not able to find anything that connects Web Jobs with API calls.Everywhere its mentioned about '.exe' files only.
I think that the first thing is that you could refer to this document to learn what is webjob.
WebJobs is a feature of Azure App Service that enables you to run a program or script in the same context as a web app, API app, or mobile app. There is no additional cost to use WebJobs.
As Ivan yang mentioend that you could create a console application or script and add call rest API code in it.
Note : If your app runs continuous or scheduled WebJobs, enable Always On to ensure that the WebJobs run reliably. This feature is available only in the Basic, Standard, and Premium pricing tiers.
I recommand that you also could use the Azure function to do that.

On how many instances is my Azure WebApi running

I am trying to implement SignalR hubs on my REST service (ASP.NET Web Api) hosted on azure. I've been reading some common stuff related to SignalR and I came to this one that it is server bound. You can check here. Which means that in order to be able to scale it on multiple server instancs I have to do some additional stuff. So, then, I started to ask myself "How many instances do I currently have running of my REST service on Azure? How do I know that?"
So, what I did was - I navigated to azure portal and opened my service > Process explorer
Does that mean than my web app scales automatically and I currently have 2 instances of my web api runing? I think it clearly says that there's currently only one instaces of it running 2 processes but how do I know if it will scale some time in the future?
No, your photo shows your app process and Kudu, which is a management interface you can access at https://yourappname.scm.azurewebsites.net.
You can see the instance count in your app's App Service Plan. If it is on Free or Shared, there can only be one. If it is Basic/Standard/Premium, it is one by default. If you haven't setup auto-scale, it won't scale to more than 1 instance unless you tell it to.

Azure Traffic Manager support with Azure Function Apps

I am trying to use Azure Traffic Manager (GTM) to geographically distribute load to function apps in each region.
I have tried adding an 'app service endpoint' and an 'external endpoint' (including adding the GTM name as a custom CNAME to the function app), but both result in "Error 404 - Web app not found.". The custom CNAME also never adds correctly.
According to the last comment on this post, the ability to do this should now be supported:
Setting up a custom domain with an Azure Function app
I am unable to comment back on the post as I am a new user.
I have tried adding an 'app service endpoint' and an 'external endpoint' (including adding the GTM name as a custom CNAME to the function app)
Azure Traffic Manager is only eligible for use with App Services at the 'Standard' level or above as mentioned here. If your function isn't host in an app plan at the 'Standard' level or above, Azure Traffic Manager will not work.
If you are not using 'Standard' or higher level app plan, Azure Functions Proxies would be a workaround for you. Please check following thread which discuss the similar problem.
Azure Functions Traffic Manager
Here is the quick reference from the answer provided by Dakota Kincer.
So the answer I arrived to after Traffic manager didntsupport Azure functions was to overall build 3 Azure functions. I built an East and a West that has my azure function code on it. Then I built a main Azure Function that has 0 code. It only has Azure proxies on it that route to my 2 other Azure Functions. The route is controlled by a variable in the proxy string that is help in the main API app settings. Using %myvariable% you can set part of the url. When I need to publish I switch the variable to the secondary URL location. Update the Primary and then switch the URL to its original primary location. This will have to work for now till traffic manager is integrated into functions or a better solution arises.
I am unable to comment back on the post as I am a new user.
You could modify your post if you want to provide more information.
Traffic Manager supports Azure functions monitoring. You can enable this by going to TM settings -> endpoints -> add endpoint -> choose Azure endpoint type -> App Service for Target resource type -> under Target Resource choose Function app which you want to monitor.
Most likely you want to be able to access function apps under specific domain domain, for example my-domain.com. For that under Custom Header Settings specify host:my-domain.com. You'll need to setup custom domain in function apps configuration too.

multiple app service plans with single (bizspark) subscription

We have BizSpark subscription with shared app service plan, where we are hosting our product. I need to host another version of the project for testing purpose, which fits into a free tier. I have checked the azure portals, but there is no provision to add a new service plan. does the BizSpark subscription support only one app service plan or am I missing anything?
Because an App Service services is an underlying component to other services, there isn't a simple way to directly create an App Service.
Since the only use case to create an App Service is to put something in it, the logic (I imagine) behind the Portals is that you create the resources you require and and it will create dependent resources within that process.
(Using the New Portal)
In order to create a new App Service plan, presuming you are deploying a new Web App. Click on New, Web + Mobile and then Web App.
When you click on Web App you will get this screen, if you fill in the details, and click App Service plan / Location at the bottom, you will be given the opportunity to select either an existing App Service or to create a new one.
The easiest solution would be to create a new Web app and when asked for App Service create a new one .. or use Azure Resource Manager template to achieve this: https://azure.microsoft.com/en-gb/documentation/templates/.
If it's another version of the App for testing purposes, why not use Deployment Slots? Slots have their custom URL separate from the Production app, separated configuration, domain bindings, it's like an App inside an App. You'll be able (if you want) to even swap the content of the Production environment with the Testing one for example.
And you don't incur in any extra cost because it runs on the resources of the current App Service :)

MVC + SQL Database + Scheduler - Deployment on Azure

We are planning to deploy one of our reporting application/product on Microsoft Azure platform for testing & research purpose.
Application is built on .NET framework 4.5 , and thankfully Azure does support 4.5 now.
Application is not Azure ready yet. I assume some config level changes are required to deploy it over Azure. Not much is required in Azure websites though.
Our Application has three major components , one is the MVC web layer built using n tier approach. Second component is an independent window service that pulls data periodically from an external system, and pushes that into the third component, a SQL Server database. MVC Web layer coupled with a business layer uses this SQL server to perform R/W operations.
Had it been a typical case of web application with a database, I'd have gone for Azure websites. Now that I have a window service/(Schedule based data puller) in picture as well, I am confused what accounts & services I should opt for , within the Azure platform ?.
Azure provides bouquet of services such as Websites, Service Bus, Cloud services, VM etc, but I am pretty confused what setup will fit in good for this application.
Some additional details about the application :
UserBase (for a single instance) : 10-30 users at a given time.
Data volume collected from external system/web service : approx 100 mb per
day.
Do I need to setup multiple services like Azure websites at one end with a database, and for scheduler/window service something else ?
Since you have a background windows service keep pulling data currently, I'd like recommend you using Windows Azure Cloud Service (WACS). You can migrate your MVC web portal as a web role and the background service logic into a worker role. Then your worker role can pull data from the external service and insert data into Windows Azure SQL Database (WASD). Then your web role can r/w data from WASD and display them in the portal.
The Windows Azure Web Site (WAWS) currently doesn't have the symmetrical feature as worker role. But since both WAWS and WACS can use WASD, you can move your web portal to WASD, and your background job into WACS worker role.
Hope this makes sense and helps

Resources