10 Best Practices for Your New Azure Project
By: Amulya Rattan Bhatia
Tags: Best Practices, Azure, Azurebestpractice

It’s important to follow best practices when starting out a new project, regardless of whether it’s on cloud or not. This article introduces some of these best practices / recommendations for Azure that might be helpful for you in your project. So let’s get started!

Don’t reinvent the wheel

Azure has a lot of existing resources, i.e. Azure Resource Manager templates, azure policies, sample codes etc. that you can employ as-is in your projects.

Resource Manager Templates — A repository of resource manager templates.

Serverless — A repository of serverless examples including technologies like Logic Apps, Azure Functions etc.

Azure Samples — Code samples and examples in .NET, Java, Python, Node.js, PHP and Ruby

Azure Policies — Community contributed azure policies so you don’t always have to write your own.

Azure subscription builder — It allows an Enterprise Account owner to quickly deploy secure, policy compliant, Azure Subscriptions.

Use Azure Blueprints

Azure Blueprints simplifies deployments by packaging artifacts, such as Azure Resource Manager templates, role assignment, resource groups and policy assignment, in a single blueprint definition. A blueprint brings each of these artifact types together, allowing you to compose and version that package, including through a continuous integration and continuous delivery (CI/CD) pipeline.

Azure Blueprints enables you to define a repeatable set of Azure resources that implements and adheres to an organization’s standards, patterns, and requirements. Blueprints can pass parameters to either a policy/policy initiative or an ARM template. Each blueprint (a published version) can be assigned to an existing management group or subscription.

Follow established design principles

Azure provides certain guidelines to make your application more scalable, resilient, and manageable. These are manifested in the form of following design principles:

Design for self healing — In a distributed system, failures happen. Design your application to be self healing when failures occur.

— In a distributed system, failures happen. Design your application to be self healing when failures occur. Make all things redundant — Build redundancy into your application, to avoid having single points of failure.

— Build redundancy into your application, to avoid having single points of failure. Minimize coordination — Minimize coordination between application services to achieve scalability.

— Minimize coordination between application services to achieve scalability. Design to scale out — Design your application so that it can scale horizontally, adding or removing new instances as demand requires.

— Design your application so that it can scale horizontally, adding or removing new instances as demand requires. Partition around limits — Use partitioning to work around database, network, and compute limits.

— Use partitioning to work around database, network, and compute limits. Design for operations — Design your application so that the operations team has the tools they need.

— Design your application so that the operations team has the tools they need. Use managed services — When possible, use platform as a service (PaaS) rather than infrastructure as a service (IaaS).

— When possible, use platform as a service (PaaS) rather than infrastructure as a service (IaaS). Use the best data store for the job — Pick the storage technology that is the best fit for your data and how it will be used.

— Pick the storage technology that is the best fit for your data and how it will be used. Design for evolution — All successful applications change over time. An evolutionary design is key for continuous innovation.

Follow the Azure well-architected framework

Microsoft Azure has a well-defined framework to help you with your architectural decisions. The Azure Well-Architected Framework is a set of guiding tenets that can be used to improve the quality of your architecture. The framework consists of following five important pillars:

Cost Optimization — Managing costs to maximize the value delivered.

— Managing costs to maximize the value delivered. Operational Excellence — Operations processes that keep a system running in production.

— Operations processes that keep a system running in production. Performance Efficiency — The ability of a system to adapt to changes in load.

— The ability of a system to adapt to changes in load. Reliability — The ability of a system to recover from failures and continue to function.

— The ability of a system to recover from failures and continue to function. Security — Protecting applications and data from threats.

You can assess your architecture based on a formal Microsoft Azure Well-Architected Review.

Follow Azure Security Benchmarks

If you are looking for security best practices to ensure a secure deployment, Azure Security Benchmarks is your one-stop shop. It aids you in improving the security posture of your Azure deployments to prioritize top risks and mitigations. The Azure Security Benchmark includes a collection of high-impact security recommendations you can use to help secure the services you use in Azure:

Security controls : These recommendations are generally applicable across your Azure tenant and Azure services. Each recommendation identifies a list of stakeholders that are typically involved in planning, approval, or implementation of the benchmark. Example of service controls are network security, identity management, data protection etc.

: These recommendations are generally applicable across your Azure tenant and Azure services. Each recommendation identifies a list of stakeholders that are typically involved in planning, approval, or implementation of the benchmark. Example of service controls are network security, identity management, data protection etc. Service baselines: These apply the controls to individual Azure services to provide recommendations on that service’s security configuration.

You can download the Azure Security Benchmark in spreadsheet format.

Choose the right technology

Azure offers more than 600 services, so it’s very important for your design and architecture to use the services that fits your workload. The next section provides a few decision-aid flowcharts to steer you in the right direction.

Compute

Database / Data store

Use Azure Cloud Shell

You can use Azure Cloudshell as your sandbox environment. It also offers persistent shell storage. This will allow you to persist files between sessions when you are trying out new things, for e.g. creating dockerfiles etc.

Know the right tools

Knowing the right tools is going to be imperative for developer velocity and time-to-market. Following is a collection of some of those:

VS Code Azure extension — There are extensions available for Azure functions, App Service, Azure Machine Learning etc.

Azure Resource Manager Template Toolkit— This tool checks a template or set of templates for coding best practices.

Azure Data Studio — A data management tool that enables working with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.

Azure Storage Explorer — A tool to manage your Azure cloud storage resources anywhere, from Windows, macOS, or Linux.

CosmosDB Explorer — A tool similar to Data Studio for CosmosDB.

Consult existing solution architectures

Azure offers example solution architectures for various industries and problem domains. These examples can be found here.

Get acquainted with Powershell

Powershell is the preferred scripting language for Azure and you will find yourself better placed if you know it, for e.g. you can write serverless functions in Azure Functions with Powershell, use Azure Virtual DataCenter — a toolkit to accelerate Azure adoption for enterprise customers is almost completely written in powershell.