I need to have the same Azure App Service Custom Domain running in different App Services on the same region. Is that possible?
Custom domians are based in DNS, only one record should be pointing to one App Service, so I think it would not be recommended to have same custom domain in multiple App Services in the same region. Being said that, it works for different regions and it is common to see this deployments for instance behind Traffic Manager or Azure Frontdoor.
In order to do this in the same region is a bit more challenging as the only way is to make sure your App Service goes to a different webspace (https://learn.microsoft.com/en-us/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan). So basically to make sure it goes to a different webspace you need to create a new Resource Group and a new App service Plan, then you can create the specific App Service and add the custom domain. In order to make sure they are in different webspaces, check if the Inbound IP is different.
Related
I want to migrate my server from azure app service to kubernetes with zero downtime. How is it possible? I have a custom domain. Website is containerized using docker. And i want to seamlessly redirect the web requests from app service to kubernetes.
I am sorry, its really easy, one just has to make the configure the new resouce accept incoming request from the custom domain and then make the custom domain point to the new resource.
I was confusued because I thought one has to validate domain ownership everytime one configures custom domain in azure.
I have deployed my node js app to azure in the region west-us. However, my friends in other countries cannot connect to the server. How can I make sure that they are able to access the app too? Is there a setting that I need to change in my azure dashboard?
It does not matter if you deploy in single region, still the users from different countries should be able to access your app with a public endpoint.
If your question is about setting up a secondary site, you need to create an appservice and use traffic manager to route the requests based on users region.
I have a wordpress site hosted on Azure. Call it, mysite.com. I'd also like to develop a separate .net app and host it at subsite.mysite.com. How can I do this without having to pay for 2 separate Azure sites?
There are ways to achieve what you require. However, key point here is to understand the Azure App Service. Because, in Azure app service, you never pay (your concern is having to pay, not having to maintain) for a single site!
If you take a closer look at the App Service Pricing model, you will see that even with the free (like in Free lunch) tier, you get to host 10 applications in your hosting plan. But you need custom domain, then you go to Shared plan, you already can host 100 web sites within it, all with your custom domain/s.
Next you will have to learn a bit about what is Top Level Domain, what is Domain, what is Sub Domain, what is A DNS Record and what is C-Name DNS record, because these are all thing you need to understand in order to properly configure your sites.
And finally read the article on how to configure custom domain for Azure App Service.
Remember. With Azure App Service, you are paying for a hosting environment (or service plan), not for a single web site!
I have a custom domain www.abc.com configured for web app webapp-a, and I'd like to transfer it to webapp-b without downtime.
If I try to add the domain to webapp-b, I am getting
The host name www.abc.com is already assigned to another Azure website: webapp-a
It there a way to let webapp-a continues to serve the requests, until the DNS cache expires?
Edit: The domain has IP based SSL binding, and the DNS is caching the virtual IP.
I faced the same issue, and was able to solve it in a tricky way.
I created new App Service Plan (previously known as Web Hosting Plan), and assigned "new" Web App to it (you can do it via new portal, or you can create Service Plan during Web App creation).
Then, I was able to assign the same host name to Web Apps in different hosting plans.
Thinking about this, I feel it logical: most probably Service Plan is mapped to physical IIS machine, and you cannot have two sites with the same host name in the same IIS for the obvious reason.
After migration from one DNS to another is done, you can remove unused Service Plan (as you basically pay for each separately).
According to a blog post by the Azure App Service Team in June 2017, it would appear that Azure now supports adding the same custom domain to multiple web apps:
There are scenarios where a customer would like to add the same hostname to multiple web apps in the same subscription, having a geo distributed website is one example. Our custom hostname feature allows you to bypass validation for hostnames that have already been validated. You only need to verify domain ownership when you add a hostname for the first time. For all other apps in the same subscription, you can add the same hostname without creating any DNS records.
You can read the entire blog post at https://blogs.msdn.microsoft.com/appserviceteam/2017/06/21/custom-hostnames-with-app-service/. The quote above was taken from the Adding the same custom hostname to multiple web apps section.
This should help in scenarios such as this where you want to transfer a custom domain name from one web app to another. You can simply add the same custom domain name to both web apps, add any required SSL bindings, and then change the DNS to point to the new web app. As the DNS change propagates, traffic should gradually move over to the new web app without any downtime.
I've tested this myself in the North Europe region and had no problems. Both web apps were in different App Service Plans. I have not tested this scenario with both web apps in the same App Service Plan. Bear in mind that if you're using IP addresses/A records in your DNS, you'd need both web apps to have different IP addresses for the DNS to be able to differentiate between your web apps.
Try assigning the domain to Azure Traffic Manager and have the traffic manager forward the request to the second site. Azure Traffic Manager and Web Apps are two different systems so you might be able to assign the same domain name to a web app and a traffic manager.
Once the DNS cache has expired remove the domain from the old Azure web app and add it to the new one, then finally delete the Traffic Manager account.
Option 2
Set the TTL to something very small, say 5 seconds (I believe your hostname provider should let you set that up), wait for the new TTL to propagate through all the caches. Then switch the custom domain from one app to another, and set the TTL back to it's original value.
This will result in just a few seconds of downtime for any customers, but if you do it at a low-traffic time the effect shouldn't be too bad.
Is it any way of placing a WCF service in an Azure CDN Endopint? Or is it only valid to place static content?
It would be useful becasue I have a web frontend that constantly communicates with the WCF service.
If not, any suggestion on how to decrease delay?
If you want to run redundant WCF services in Azure, you create a WCF Service Web Role project and deploy it. Within the configuration, you can scale the deployment up to meet load. You can create and deploy multiple roles per package with each role having its separate instance count.
If you want the service to be distributed across multiple regions, you have to use the Azure Traffic Manager which handles directing traffic based on location or in a round robin format.