PaaS Introduction to Azure and Bluemix

As I stated in my previous article we live in a time of PaaS & SaaS and since I have already described the current trend in software development, the next necessary step is deployment and running your apps. This story is focused on server side apps.

Back in the old days the common solution for app deployment was that you had a physical or virtual private server and you managed everything from the OS through supporting libraries to your deployed software. More often you had a special server for each project/app and you had to manage multiple systems.

Well that’s past or at least it should be! The modern approach of containerization has a strong influence on how we deploy and run our apps nowadays. Imagine that you can care only about writing your code and someone else will take care of the OS, libraries, security and scaling. That’s what PaaS is all about. It provides a slightly configurable runtime for your programming language in the cloud where you just upload the code and you worry about nothing else.

Three big players in the field which I came across during development:

  • IBM Blumix
  • Microsoft Azure
  • Heroku

I will describe in more detail the first two as they provide more features and also services beyond PaaS, along with having more experience with them. But I still think that Heroku might be a great fit, especially for smaller teams.

Runtimes

Both Azure & Bluemix have support for the most popular languages like PHP, Node.js, Java, Python as well as static websites. The great thing about Bluemix is that as it’s basically cloudfoundry, there is support for custom buildpacks (http://docs.cloudfoundry.org/buildpacks/) so you can run almost anything there. Furthermore you can use Heroku buildpacks on Bluemix, which is just great!

We encountered no problems running the Node.js apps. Everything worked outside the box on Bluemix, you can even create a background app which doesn’t listen on any port.

On the other hand we had problems running PHP Symfony apps. On Azure there was problem with file permissions and horrible performance.

On Bluemix we had a problem with the PHP-Buildpack and we had to bend-over the app structure and tweak the buildpack’s configuration.

FileStorage

When developing a cloud app, you have to take into account that you won’t have a persistable file system for your files within your app (runtime). Both Azure and Bluemix have the solution for this.

We tried ObjectStorage (Bluemix) and AzureStorage. Both work very similarly and well. To be honest I prefer the Amazon S3, but you will be just fine with the above.

AutoScaling

I love how simple it is to manually adjust memory or instance count in both services (especially in Bluemix), but when it comes to autoscaling Azure really rocks and Bluemix sucks. Both enable scheduled scaling on specific times and via used memory. Azure also provides scaling based on CPU usage (throughput) and MessageQueues capacity.

On the other hand we don’t face that many peaks in usage so we don’t use that feature much.

Deployment

Deployment is done via Git hooks or the CLI tool. Bluemix has the option of using its own Continuous Delivery pipeline, which is really handy and easy to understand. However, if you already have a continuous integration platform deployed somewhere you might find it unnecessary.

Web Portal

When it comes to web interface, they are all simply just horrible, slow and hard to use. For me the worst of these is Azure, where finding something is a real pain. Bluemix is faster, cleaner, but still sometimes very unintuitive.

Command line tools

All 3 platforms have their own CLI toolset from which you can create and control your deployments. It takes time to get used to the syntax but after awhile you will love it! It’s the simplest and fastest way to control your apps. You can deploy apps, see logs or scale running apps in a matter of seconds.

Other Services

Azure and Bluemix supports much more than just PaaS. Azure is particularly king of the hill with the whole cloud package. Both services can provide you with FileStorages, Database deployments, Action Schedulers, Machine learning toolsets and much more. Azure offers more datacenters and CDN as well as an overall bigger infrastructure. But as we deploy apps in the EU region only, that wasn’t an issue for us.

Pricing

Both services cost almost the same and pricing shouldn’t be an issue for you. But there is one HUGE difference Bluemix doesn’t have any free developers instance. You can have one 256mb RAM app running for free but if you are developing several applications you have to pay even for basic instances, which just SUCKS and I believe it could be major dealbreaker for lot of companies!

Show your support

Clapping shows how much you appreciated Dominik Veselý’s story.