In my previous tutorial I showed you how easy it is to set up a simple HTML site or Magento web store on Windows Azure. Now it’s time to take it a step further, since these examples only touched the a minor part of the Windows Azure feature set. I will now show you how to set up:
- Traffic management: Distribute your traffic to multiple locations – useful for load balancing, geographical distribution and failover.
- Monitoring: Use different type of monitors to keep an eye on performance, uptime and availability.
Also, I will shine a light on a few of the other interesting features Windows Azure offers.
To describe that the Windows Azure traffic manager is capable of, I can best make use of their own introduction to the product:
“Use Traffic Manager as part of your overall networking solution – Traffic Manager applies an intelligent policy engine to the DNS queries on your domain names so that you can send traffic to the best data center for performance, business continuity, price, compliance, legal, or tax purposes.”
Simply said, it’s a very advanced way of distributing your content based on the metrics you find important or are required to use. I will focus on the performance and continuity aspect. So let’s see how this works out.
Traffic Manager has very little in the way of settings to start with, just a DNS prefix (I will be using my Magento demo again), and a load balancing method. Your options are:
- Performance: Distribution based on server closest to the visitor.
- Round Robin: Load balancing, where you set up multiple identical servers to which the traffic is distributed evenly.
- Failover: This is used for backup purposes, where you keep an identical copy in case your primary server(s) goes down.
For this tutorial I will go with “Round Robin”, but the methods of setting up are much the same with the two other options. I want to see how easy it is to set up load balancing with Windows Azure.
You begin by adding “Endpoints”, which are virtual machines you created. For this tutorial I added two more Magento demo servers, based on the image from my previous tutorial.
Once added, you can see the status of your endpoints. If the lights are green, you only need to configure how they should be handled.
Actually, you don’t need to change a thing if simple Round Robin is all you need. It is already working with these settings.
And, if you are not satisfied or want to try something else, you can easily switch. The configuration stays the same, except when you choose for failover in which case you can prioritize your servers. This is certainly a very easy way.
On a side note: I haven’t been able to find in the dashboard how you can distribute traffic based on a specific type of visitors, even though Microsoft states you can send traffic based on tax purposes for example. This configuration leaves much to the underlying engine itself. But, there is an extensive REST API reference for if you want to go really hardcore.
All in all, I am very impressed with the ease of use to set up this Traffic Manager.
Each virtual machine you launch comes with a basic set of monitoring options. And you can expand this with some important metrics for uptime and response, and set up alert rules. As with most of the Windows Azure feature set, this is quite easy. I will show you:
- How to set up response time and uptime monitors
- How to set up an alert rule to have you notified in case of problems
Setting up monitors
For each of your virtual machines, you will find a page called “monitor”. Some basic stats (disk read/write, network out/in and CPU%) are already set up. You can extend these with “Uptime” and “Response Time”, which pings your endpoints. This is basically external monitoring, where the other parameters are internally measured.
You first need to select up to three locations for the monitors to be located, which you can do by visiting the “Configure” section for your virtual machine.
You can then set these up by clicking “Add metrics” in the bottom bar, choose “Endpoints” and select the desired monitors.
In the monitor screen, you will see an uptime percentage displayed, and when you select the uptime monitor for example, there is (again in the bottom bar) a button called “Metric Details”. Clicking this will result in the screen you see above, with more details about the measurements.
Setting up alert rules
If you want to get notified in case of any disturbances in your VM’s performance, you can set up alert rules. This is done by clicking “Add Rule” in the bottom bar. You are first shown a popup where you can name and describe your rule.
The next screen is more important, since this is where you define the condition for which you want to receive an email. In this case I want to be notified when my server reaches 99.5% uptime in the last 10 minutes, over a course of the last 15 minutes.
All of this is very basic of course, and relies on manual actions performed by the administrator based on alert rule email. This isn’t very advanced, but for this you will find the REST API to be very useful. You can find the documentation here.
And since Windows Azure is all about the graphs, you downtime is also displayed graphically along with all the necessary details.
And then there’s this…
The Windows Azure feature set is very extensive, and what you are seeing here is just from inside the management portal. There is a whole world hidden behind the API, and Microsoft has it very well documented so you can make good use of it. But when looking at the management portal, there are some nice gems as well.
Windows Azure offers a full back end for mobile apps for iOS, Android and of course Windows Phone. It allows for database set up, backed processing and extensive monitoring.
Used for Apache Hadoop data processing, you can select up to 32 nodes for data processing and analyzing.
Windows Azure Cache
Still in preview mode, but this allows for memory based caching which gives you significant performance improvements. You can use this for your websites and apps, and it is maximized at 150 GB, which is, of course, immense.
From encoding to streaming your media content, this is a full blown media server. You can use it for on demand and live streaming, and combine it with a CDN for an improved user loading experience.
Visual Studio Online
Windows Azure offers deep integration for Visual Studio Online by offering code storage, project management and testing and easy deployment into the cloud.
As another Microsoft product successfully introduced to the cloud, Active Directory (AD) in Windows Azure extends the current local AD installation. This way you can allow the AD users to easily access cloud services or external programs online based on their AD credentials.
Windows Azure Free Trial
As you have probably guessed by now, I was amazed by the features Windows Azure offers. I first thought it was more of a “me-too” product, but after browsing through all of their features I found out it’s way more than that. It all works in a way you expect of Microsoft, and it is offered in a more visual way than Amazon AWS for example.
What I like most of all is that you are not limited to Microsoft technology. You can build a full LAMP stack with Magento installed on it, without ever being limited by the platform. It is founded and operated by Microsoft, but that’s about it. Of course it’s offering Microsoft’s own products and technologies as well, but that’s complementary.
If you want to try it yourself, Windows Azure offers a 30-day free trial. You can use Christian Leeds’ article to install WordPress on Windows Azure, or my previous article to learn how to install Magento or a simple HTML site.
With all this under your belt, you will be in a prime position to not just enter but win the Push The Web Forward contest run by SitePoint and Windows Azure. Browse the online gallery of entrants to see what you’re up against. Entries close December 20.
The Principles of Beautiful Web Design, 4th Edition
Docker for Web Developers
Learn PHP in One Day and Learn It Well