I thought it would be fun to show the recently released SQL Azure Data Sync at the Azure DevCamp in Santa Monica a couple of days ago. This was my first exposure to the recently released CTP, and I was so impressed by how easy it was to set up a synchronization that I thought I would write it up.
You configure Data Sync by using the Azure portal. You create a “sync group” that contains “member databases”. The member databases are either on-premise or SQL Azure. The following is what my portal view looked like after I created these entities:
Setting up the actual synchronization flow is also done through the portal, this is where you:
- add your cloud and on-prem databases
- defining the synchronization schedule (ie: “sync every 60 minutes”)
- define the sync flow (one way or bi-directional)
- define conflict resolution
- define a synchronization “hub” that is used to track synchronization
In my example, I had an on-premise database that I wanted to replicate to SQL Azure. This was a one-way flow, from on-prem to a SQL Azure instance I had in North Central US. What was super-cool was that in front of the audience, I provisioned a brand new SQL Azure server in South East Asia, and added it to the sync group so that it too would receive changes I made to the on-premise database. Elapsed time was a couple of minutes, because I was pausing to explain. That’s mind-boggling if you think back a few years to what it would have taken to achieve the same result.
Here’s what my sync flow looked like at the end of the demo:
The team has done a great job, this was incredibly easy and intuitive to set up yet is also a very powerful capability for geo-distributed applications.