Azure: What to use when?
Microsoft Azure offers so many solutions that any business owner would struggle to match them up with their real-world problems. The trick is to know what to use when.
What are the most popular Azure services? Let’s explore Azure Virtual Machines, Cloud Services, App Services, Data Storage and Serverless computing.
Use Virtual Machines to Lift and Shift
Azure Virtual Machines (VMs) are nearly identical to conventional bare-metal servers. The service offers full control over your VMs and allows you to install and run your own software.
Azure Virtual Machines are ideal for lift and shift scenarios for established businesses with the need to move IT infrastructure off-site. That accounting PC under your desk, that build server next to the filing cabinet and that legacy installation that nobody wants to touch and that keeps you awake at night are prime candidates for lifting and shifting to Azure. Simply use the disk2vhd utility to virtualise them and mount them in the cloud.
Note that you are responsible for your own updates and backups when using Azure Virtual Machines.
Use Cloud Services to host your application
Your business may not need to virtualise specific machines, but instead, you may need general purpose virtual machines. Azure Cloud Services are general purpose preconfigured VMs maintained and updated by Microsoft. Many SDKs are available, including .NET, Java, Node.js, PHP, Python and Ruby.
Companies who write their own software can use Azure Cloud Services if they don’t have in-house IT support and they need to deploy their applications to preconfigured VMs.
Licence costs, updates, backups are included, making Cloud Services more affordable and hassle-free than Virtual Machines.
Use App Services to host your code
When I see IT infrastructure expenditure on a start-up company’s business plan, I see red lights.
Most start-ups are born in the cloud so that they can focus on their core business and not on managing IT infrastructure.
That is why Azure App Services is such a good fit for start-ups. It’s a complete Platform as a Service (PaaS) solution for hosting your company’s code. There are no VMs to manage, and there’s nothing to install. Most deployments can be done quickly from Visual Studio, GitHub or VSTS. Your applications can be scaled easily, making them the most affordable option for hosting applications in the cloud.
What about my data?
To minimise network latency and security risks, it goes without saying that your migration plan should include moving your databases to Azure. Let’s look at your options.
Azure SQL Database is a relational database for high availability scenarios. In fact, it is a scaled down version of SQL Server in the cloud, and most SQL Server databases migrate to Azure without any customisations.
Use Azure SQL if you have existing Microsoft SQL Server databases that you’d like to migrate to Azure. After the migration, a simple change to your application’s connection string is all that’s needed. You can also continue to use your favourite Microsoft tools SQL Server Management Studio and Visual Studio to manage and explore your data.
Similarly, Azure Database for MySQL and Azure Database for PostgreSQL are ideal for migrating on premise MySQL and PostgreSQL databases to the cloud.
Enterprises with ETL requirements may opt for Azure SQL Data Warehouse for prepared, structured data reporting over large volumes of data.
Blob Storage is worth considering when storing unstructured data, such as files and other binary content, while Table Storage offers NoSQL access to key-value pairs of semi-structured data. Use Blob Storage or Table Storage when the business requires fast and cost-effective access to larger objects.
Your global company may need to replicate its document data for high availability to a broader international audience. In such cases, use CosmosDB, a high-speed document database for storing key-value data, columnar data and document data. It supports multiple APIs: SQL API, MongoDB API, Apache Cassandra API, and Table API, making it ideal if your developers are already familiar with these APIs.
Note that you need to estimate your CosmosDB requirements upfront, as Microsoft needs to reserve capacity ahead of time.
Software development is expensive. Sometimes it’s necessary to experiment with a business idea before fully committing to the roadmap. Many business processes can be captured in Azure without much code. These can deliver quick gains for the business at low cost, as the serverless components are billed on a pay as you go basis.
“Serverless” means that you don’t have to set up a server to run code.
Azure Logic Apps are ideal for designing Windows Workflows in the cloud. The design process is visual and codeless, enabling non-technical power users to capture their business processes in software. Use Logic Apps if your business needs to create a digital workflow while connecting to other cloud services like Office 365, SalesForce, Dropbox, Google, Twitter and many more.
On the other hand, Azure Functions are ideal for deploying your business logic to the cloud in the form of code. It has an HTTP based API and can be written in many computer languages. Use Azure Functions if your business needs to access a centralised set of business rules via HTTP.
Do you remember how businesses used to submit their mainframe jobs via punch cards? Use Azure Batch if your business needs to run batch jobs that are too large for a single computer. Examples include month end billing, payroll processing, rendering animated films, and advanced risk calculations.
Jobs can scale out and run in parallel to decrease the duration.
How will I start the jobs? Azure Scheduler is a reliable job scheduler in the cloud. Just define the job intervals, and Azure Scheduler will fire any HTTP endpoint, whether cloud-based or not.
Click here to read the full article on DVTInsights by Morne Fourie.
Exploring Advanced Azure services: Messaging, Networking and Orchestration.
Integration via Messages and Events
When your company’s software solution evolves into a number of distributed systems, it’s time to think about message based and event-based programming.
Azure’s got you covered with Event Grid, Event Hub and Service Bus.
As you may know, there are slight differences between Messages and Events.
Messages are used when the publisher has an expectation about how the subscriber handles each message. The publisher expects a response when the message is handled.
Events are lightweight notifications where the publisher has no expectation about the handling of the event, and expects no response.
When companies have an existing service bus architecture, migrating to Azure Service Bus in the cloud makes perfect sense, as it includes the expected service bus features like duplicate detection, transactions, ordering and retries.
For notification events, use Azure Event Grid as an eventing backplane for reactive programming if your business wants to modernise its code base by eliminating polling.
Or use Azure Event Hub if your company is streaming telemetry data and requires playback functionality on these events.
Note the difference: Hub events may contain data, while Grid events don’t.
Companies often require VPN connections between their offices and the cloud. However, VPNs may be slow because it tunnels over the public internet.
Instead use Azure ExpressRoute to configure private networks between the office and the cloud, because it can be connected to your existing WAN or MPLS network to reduce network latency.
Let’s consider the networking solutions for your Azure hosted applications. Load balancing is a time consuming and tedious feature to set up. Fortunately, Azure Application Gateway provides an HTTP load balancing solution out of the box. It’s a web application firewall with cookie affinity for session sharing and can be configured for SSL offload. Use Application Gateway if your user base has outgrown the capacity of a single server and load-balancing is required.
Similarly, Azure Traffic Manager can be used as a load balancer. However, it has additional uses like AB testing, smooth migrations and automatic failover. Use Traffic Manager if you need to split incoming traffic out to different machines or when zero downtime deployments become a requirement. (And no, AB testing has nothing to do with cricket).
There are many cloud providers out there, and the risk of vendor lock-in may concern your company. However, Docker has emerged as a stable and reliable Open Source technology whereby applications can be hosted in containers. What Azure and other cloud providers have in common, is that they all support Docker containers.
If your company wants to move their software applications to the cloud, but at the same time avoid vendor lock-in, consider dockerising your applications and migrating them to Azure.
Containerised deployments may induce a steep learning curve and need specialised tools to maintain overall health, but when it comes to images, containers and orchestration, Azure’s services should be music to your ears.
However, let’s first revisit some basic terms. A container image is a recipe describing a self-contained OS with your code installed on it. For example a Docker image.
A container is a running instance of your image, for example, a Docker container.
Orchestration is the ability to run your containers reliably and resiliently by automatically managing availability, scaling and updates. For example, multiple load-balanced containers arranged as a complete solution.
When you develop containerised applications, you need a container registry such as Docker Hub. However, your business shouldn’t push its container images to a public registry, but rather to a private and secure container registry.
Use Azure Container Registry (ACR) if your company wants to manage container images in a private registry, secured behind Active Directory, and accessible to multiple regions across the world. ACR is managed with Open Source tools like Docker CLI, and your DevOps team should have no additional learning to do if they’re already familiar with Docker tools.
Azure Container Instances (ACI) runs single containers (Windows or Linux), and in these cases, no orchestration is needed. Use ACI if you’re deploying single instance containers without any load-balancing requirements. ACI can pull your container images from Docker Hub or ACR.
If your company needs to deploy a whole solution made up of several container images, then use Azure Kubernetes Service (AKS) to streamline your deployments. AKS is simply a façade over Open Sources orchestrators like Kubernetes, Swarm and DC/OS. It greatly simplifies the deployment, management and operations of these orchestrators.
If your business is already running on premise Windows based orchestration in the form of Service Fabric, then Azure has you covered. Azure Service Fabric can run executables, services, actors and containers.
As you may know, it’s best practice to externalise your application’s settings and secrets, so that each deployment can be repeated reliably regardless of the hosting environment. Another reason is that connection strings and other secrets should not be visible in your source code. Imagine what could happen if that junior developer gets hold of your production database’s connection string, because it was stored in your Git repository!
Rather use Azure Key Vault for secret management in the cloud, so that you can store your secrets outside of your source code repository. Your application’s start up code will retrieve the secrets and set up any database connections and services without the need to expose secrets to your staff members.
AI + Machine Learning
Machine Learning is the process of computers arriving at their own conclusions without being specifically programmed to do so.
Companies are starting to harness machine learning to do sentiment analysis on web-based forums, blog posts and tweets which mention the company. This gives the company a competitive advantage in dealing with negative sentiment before it becomes a widespread problem.
Azure provides many AI and ML solutions – too many to mention here. Your company could use Azure Machine Learning for image analysis, facial recognition, speech recognition, chatbots and sentiment analysis from text.
Let’s talk about security and your users’ sign-on experience.
Azure Active Directory is your identity provider in the cloud. Use Azure Active Directory if your business already has Active Directory on premise. AD Federation Services (AD FS) can be used to provide a seamless sign-on experience between your on-site and cloud-based applications.
Data loss and data corruption shouldn’t keep you up at night. Your company may already have disaster recovery strategies in place, but consider the Azure Backup and Site Recovery solution as a scalable offsite option to reduce IT infrastructure costs. Your company can backup VMs and apps and covers Linux, Windows, VMware, Hyper-V and bare metal servers.
Click here to read the full article on DVTInsights by Morne Fourie.