1

What is the most effective way to run a dotnetcore app on azure?

Currently I am hosting two servers (1db and 1 server201x) and running it through IIS and it works smoothly, but I want to explore options with running on Azure.

I see there is a DBaaS and wanted to know if there is a simple way to host an the webapp without having to run a windows server.


To follow up this, I want to clarify a bit more about the product.

We have an API, Web App that connects to the API, and a DB.

Does Azure have serverless solutions to host all 3 of these services? Do I need to create a network first?

Sven
  • 97,248
  • 13
  • 177
  • 225
Frank
  • 11
  • 1

2 Answers2

1

You could use Azure AppService to host your app. With this service you can get a free app if you use their subdomains and very little resources. Pay U$$ 10 per app if you want custom domain but still using little resources. If your app uses a reasonable amount of resources (cpu, ram, etc) then you should use basic at least, this cost $55.80/mo and you can host as many apps as you want (your limits are on cpu / ram)

This last option may sound expensive but we have advantages here. The advantage of using AppService is that you don't have to manage things like windows server updates, security, etc. Also you gain the hability to do deploys using git which saves a lot of time (and time is money). Furthermore you have development slots to test different versions of your site before going to production.

As for the DBaaS they have Azure SQL Database which is API compatible with SQL Server. As far as most application that uses SQL Server works, is a direct replacement. You just change the connection string and it works. We have here also the advantage of not having to install updates or secure sql server. You can even left Azure the backup thing (though you can also manage it yourself). You get point in time restore which means that you can restore to any point in time (up to some limit depending on service tier). This can be use to solve human and software errors, or hacks with only a couple of clicks instead of dealing with backup files and remoting servers.

Pricing for DBaaS Azure SQL Database is per performance basis and uses a thing called DTU (Database Transaction Unit). You can use Azure SQL Database Query Performance Insight to measure how many DTUs you need but a basic service tier runs from only U$S 5.

We have to remember that with cloud we are paying per hour and we can scale up or down resources if we need to save more money or gain more performance.

Prices are for Central US Datacenter. With others it may vary. Also if you have a Visual Studio Subscription (previously MSDN) or Bizpark or Action Pack you can get some discounts.

In order to know how to better use your money in Azure Cloud I can recommend you this article by Scott Hanselman. In general the Penny Pinching Series by him is a lot resource to learn and understand more about this.

alexsaez
  • 11
  • 1
  • >then you should use basic at least, this cost $55.80/mo and you can host as many apps as you want (your limits are on cpu / ram) And limits on cpu/ram is kinda okay in this scenario. As long as you stay away from "hungry" SQL servers. – Net Runner May 02 '17 at 11:31
  • @NetRunner I agree about its kinda okay in this scenario. You can't host SQL Servers on AppService. Is just for apps since it's managed. If you need database for your app you could use Azure SQL Database or adquire an Azure VM (thought this last one is not managed so I wouldn't recommend it) – alexsaez May 03 '17 at 12:48
0

For database as a service, SQL Azure is the way to go, so long as it meets your performance requirements.

Alex has already covered using the App Service for hosting, but as your using .net core your in a fortunate place that you can also look at other options such as Containers, or Service Fabric.

You don't mention what you mean by most effective way to host, if you are looking for the cheapest and least complex then app service and Azure SQL are going to be the best route, but if your running a complex application and things like containerisation or micro services appeal, then you are in a position to take this up.

Sam Cogan
  • 38,158
  • 6
  • 77
  • 113