Skip to main content

Azure Site Recovery (Day 30 of 31)

List of all posts from this series:

Short Description 
Azure Site Recovery offer us a way to manage and control the replication and recovery actions of our machines. We have the ability to replicate our entire data center. Using this service you can replicate your datacenter on Azure, without having to reverse resources in advance.

Main Features 
Hybrid Solution
You have the ability to replicate virtual machines that are on on-premises data centers on Azure or on another hosting providers.
Custom Replication Policy
You have the full control to the policies that are used to create the replications. In this way we can manage the replications use cases.
Site Recovery is not adding another replication mechanism over existing one. It is only the orchestration over the existing one. Technologies like SQL Server AlwaysOn, System Center, SAN or Hyper-V can be used.
Ability to set Azure as disaster recovery site
Having a second site for disaster recovery can be extremely expensive. Using Azure as the second site for recovery purpose we can keep the cost at a low level.
Real time health monitoring
Site Recovery monitor the current health of you data centers and virtual machines. In this way you can know what the current state of your system is and what kind of actions you should trigger.
Encrypted Connection and Content
All the communication between your data centers and Azure is encrypted. In this way nobody can still the content that is send over the wire. We also have the ability to encrypted the content that is store on Azure. We will be the only one that can access it.
Recovery Orchestration
Site Recovery allow us to define different actions in a specific order. This feature allow us to recover our system in less time and in the order that we want. The recovery flow that we define run any kind of scripts and can also require human intervention at different steps of the recovery plan.
Site for on-premises or hosted on Azure
Azure Site Recovery can be used not only for on-premises sites. We can also use this for recovery plans for sites that are hosted on Microsoft Azure.

The only thing that could create problems is the location where meta-data are stored when we replicate on-premises content to another on-premises location. In this use case the meta-data is stored on Azure Site Recovery (on cloud). It is normal to send meta-data to this location because Site Recovery orchestrate all the actions, but people may say that we increase the risk of a failure during the recovery action because we have another node that may fail.

Applicable Use Cases 
Below you can find some use cases when I would use Azure Site Recovery.
On-premises Site
When you have a site on-premises and you need a good recovery plan you can use without any kind of problem Azure Site Recovery to replicate your content on Azure. In this if something goes wrong with your on-premises site you will be able to recover it from Azure.
On-premises Site in Life Care industry
Because of strict regulations in life care many countries don’t allow companies to store data the country itself (patients information for example). In this scenarios we could use Azure Site Recovery to orchestrate the recovery plan on another data center from the same country (region).

Code Sample 

Pros and Cons 

  • Encrypted Content
  • Encrypted Connection
  • Works with on-premises sites
  • 99.9% SLA
  • Support multiple technologies


If you calculate the costs of Azure Site Recovery you should take into account the following:

  • Number of instances that you want to protect
  • Storage Size
  • Storage Transactions count 
  • Outbound traffic (from Azure data centers)

Azure Site Recovery in combination with Azure Backup can be an interesting solution when we want to create a system where data is not lost and recovery can be made simple and easy.


Popular posts from this blog

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Entity Framework (EF) TransactionScope vs Database.BeginTransaction

In today blog post we will talk a little about a new feature that is available on EF6+ related to Transactions.
Until now, when we had to use transaction we used ‘TransactionScope’. It works great and I would say that is something that is now in our blood.
using (var scope = new TransactionScope(TransactionScopeOption.Required)) { using (SqlConnection conn = new SqlConnection("...")) { conn.Open(); SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = conn; sqlCommand.CommandText = ... sqlCommand.ExecuteNonQuery(); ... } scope.Complete(); } Starting with EF6.0 we have a new way to work with transactions. The new approach is based on Database.BeginTransaction(), Database.Rollback(), Database.Commit(). Yes, no more TransactionScope.
In the followi…

GET call of REST API that contains '/'-slash character in the value of a parameter

Let’s assume that we have the following scenario: I have a public HTTP endpoint and I need to post some content using GET command. One of the parameters contains special characters like “\” and “/”. If the endpoint is an ApiController than you may have problems if you encode the parameter using the http encoder.
using (var httpClient = new HttpClient()) { httpClient.BaseAddress = baseUrl; Task<HttpResponseMessage> response = httpClient.GetAsync(string.Format("api/foo/{0}", "qwert/qwerqwer"))); response.Wait(); response.Result.EnsureSuccessStatusCode(); } One possible solution would be to encode the query parameter using UrlTokenEncode method of HttpServerUtility class and GetBytes method ofUTF8. In this way you would get the array of bytes of the parameter and encode them as a url token.
The following code show to you how you could write the encode and decode methods.