Taking on the cloud

Read this if you like AWS.

Claus

6 minute read

“Is this another piece of Internet propaganda? Microsoft is just trying to get me to pay for their expensive cloud. I’ll stick with AWS!!11!” We have all had these thoughts about the other cloud provider. However, technology should be for everyone to choose whatever fits their needs. Does Azure fit yours? Read and find out.

Regardless of any personal preferences, I thought that Microsoft’s developer tools always were impressively automated and advanced. Unfortunately without an excuse and money it was always hard to use them in daily tasks - but this has changed significantly when Microsoft started their Open Source journey.

In fact a lot of the technology in Azure is based on Open Source or offers hosted Open Source technology solutions. As a Linux person (and coming from Open Source), this was a great revelation, and it made me look at what lies beyond the portal.

Microsoft Azure is very much oriented at companies and developers with specific needs. While it’s certainly possible to simply use the IaaS part (Azure Compute Virtual Machines) along with (almost) any OS and runtime environment, a lot of other tools and services can solve known problems quicker, easier, and cheaper.

In order to find those solutions, it’s important to see what’s out there, so this will be a shallow dive into a small part of Azure: Application Services. The following sections will explain what they are, what they are for, and why this could make life simpler.

Is PaaS still a thing?

App Services are made for web applications and they remove all the hassle fun from managing your own server infrastructure - a Platform as a Service (PaaS). PaaS was pioneered by Google with the App Engine quite some time ago and it required an application to be linked against a specific framework and there was little configuration options.

Nowadays there are many competing services such as AWS BeanStalk, Google AppEngine, Heroku, … each with their own set of features. Yet their offerings are all similar - but with their own spin. Looking at Azure’s App services, they offer a very versatile service that offers reliable scalability and robustness suited for enterprise applications. As far as technology goes, the current support includes:

  • Java
  • .NET (Core)
  • JavaScript
  • PHP
  • PowerShell

… and if all else fails, containers are also an option. Whenever an App Service plan is created, it reserves resources on unspecified virtual machines within the chosen region, shared with others. Upon creation of the actual App Service, the scheduler takes the plan’s resources and starts deploying the application. The source for this deployment can be anything from a regular Git repository to an FTP transfer (heh). The type of application is automatically detected - however in case that fails to do that properly, it’s possible to look around with a Kudu web console.

App services run on shared resources, with a plan to govern their needs

Preloaded with Stuff

Microsoft Azure is incredibly efficient and re-uses a lot of its own services. Consequently App services (which in itself is based on a different technology) make up other services too. They can be thought of as a “predefined” App service skeleton where users only provide what matters to them.

(Serverless) Functions

Functions take the PaaS principle to the extreme: by only hosting a piece of code you can manage, deploy and scale a service on function level. Azure provides several runtimes (scripting hosts) out of the box, but allows any executable or script to be run as a function. As first class citizens, CLR-based languages and Node.js enjoy the best support and include support for all triggers, inputs and outputs.

Functions are great to complete fairly small tasks in an environment that provides the required input and output channels. Usually it would be too expensive to maintain a full stack in these cases. If the service grows and becomes very successful it’s recommended to switch to a regular App Service plan to avoid overpaying :).

Another interesting fact about Functions is that they too can be deployed and managed in Git, which allows for versioning and better control over the active code.

Logic Apps

To wire up apps in a more workflow-oriented way (like with Zapier or IFTTT) Azure provides the Logic App Service, which also provides the scale and flexibility of the Web App service, but lets the user focus on the business case instead of writing the actual code. Of course focussing on the code is certainly possible by integrating your own Functions and Web App services.

Economics

App Services are built around plans, which determine the number of cores, available memory, storage, along with other features such as deployment slots (see also machine sizes). These slots, along with API proxies and auto scaling, are handy features for easing the potential headaches for product and ops teams.

Is it worth it? Cloud pricing is always complex and very use-case specific. However for App Services the basis is always either a plan or consumption-based billing. A plan can commonly host multiple applications and Functions for a typically stable monthly bill, which can reduce cost per application significantly. Pay-per-call for Functions and Logic apps make sense within flexible usage and completely eliminate the worries of maintaining infrastructure (100% managed)! :)

App services provide a great way to skip over the low-ish level issues of setting up, maintaining, scaling, and generally operating infrastructure and just focus on the development. Use cases could range from simple web sites to data collection APIs with CRM integration.

However if the use case is more complex and requires permissions, hardware or very specific features, App services might not be the best choice. To find out what other choices there are, you can go and look at the docs yourself - or read about it as soon as that’s available here :)

Is this for me?

The most interesting question now is: does this fit my needs? The answer is YES! if PaaS is for you; if the answer is NO! however, Azure will probably have something that fits your needs and you will find out about it on my blog :) Of course if you like fiddling with details on virtual machines, the answer was in the first section and you should go deploy a Azure Compute Virtual Machine ;)

If you like what I write, feel free to drop me a message on Twitter and follow me while you are at it. And sharing is of course appreciated as well!