How to implement Hybrid File Service in Azure

Shubhangi Vashist
4 min readMay 20, 2024

--

In this blog post, we’ll explore how to use Azure File Sync and Azure Files to extend file services hosting capabilities across cloud and on-premises file share resources.

What is a hybrid file service you may ask?

A hybrid file service is a solution that enables organizations to seamlessly integrate file storage and sharing capabilities between on-premises infrastructure and cloud environments. It allows users to access and manage files from both on-premises servers and cloud storage platforms, creating a unified file storage solution that spans across hybrid environments.

Let us look at some scenarios:

  1. Hosting file shares that need to be accessible from cloud and on-premises environments.
  2. Synchronizing data between multiple on-premises data stores with a single cloud-based source.

Now let us understand it further by looking at the architecture

Working of the Architecture

This architecture represents a company that has over 2,500 employees in 80 branches worldwide. During the COVID-19 pandemic, many users of the company’s systems had to work away from their offices. Meanwhile, the systems hit the limits of their on-premises file servers at various branches, and the company faced the complexities and costs of updating and maintaining the on-premises solutions. Also, there were other unpredictable outages at branches, outages that stopped work for users at the affected branches, whether or not the users were remote.

The company turned to Azure Files and Azure File Sync to address these issues and to reduce costs. Azure scalability solves the limits issues, and near-instant disaster recovery keeps users working during outages.

The key aspects of the solution are:

  • Users who are on-premises at a branch use branch desktops for their work. Remote users can be almost anywhere.
  • At each branch, an on-premises Azure File Sync server endpoint provides a cache of the branch’s cloud-based file share. On-premises users that connect to this endpoint get quick access to their data.
  • Azure file shares provide centralized file storage in the cloud for workload files. Each branch has its own file share for its data. Remote users or clients can connect to the file shares can get quick access to the data.

Steps to create a sample Hybrid file service in Azure

The architecture consists of the following key components:

  • Azure storage account: A storage account is used to host file shares.
  • Azure Files: A serverless cloud file share that is used for cloud-based file storage and can be accessed from anywhere.
  • Sync groups: A sync group defines the sync topology for a set of files. Endpoints within a sync group are kept in sync with each other. A sync group must contain one cloud endpoint, which represents an Azure file share, and one or more server endpoints. A server endpoint represents a path on a registered server. A server can have server endpoints in multiple sync groups.
  • Azure File Sync agent: This is installed on Windows Server machines to enable and configure sync with cloud endpoints.

It is simple to create a hybrid file service:

  1. Prepare the VM: Ensure that the VM meets the prerequisites for installing the Azure File Sync agent:
  • Supported operating systems: Windows Server 2019, Windows Server 2016, Windows Server 2012 R2
  • Ensure that the VM has outbound internet access to communicate with Azure.

2. Install the Azure File Sync agent: Download and install the Azure File Sync agent on the VM. You can download it from the Azure portal or using the direct link: Azure File Sync agent download.

3. Register the server: After installing the agent, launch the Azure File Sync agent application on the VM. Sign in with your Azure account, select your Azure subscription, and choose the Azure File Sync resource you want to register the server with.

4. Create an Azure file share: Once the storage group is created, proceed to create an Azure file share within the Azure Storage account.

5. Configure server and cloud endpoints: Once the server is registered, you can configure server and cloud endpoints in the sync group under the Storage Sync services. Server endpoints represent the folders on the VM that you want to sync with Azure File Sync. The cloud endpoint represents the Azure file share. Follow the steps to know more.

5. Wait for initial sync: After configuring server endpoints, Azure File Sync will start syncing data between the VM and Azure Storage. Depending on the amount of data and network speed, the initial sync may take some time.

We have reached the end of the blog. In this blog, we have explored how to implement a Hybrid File Service in Azure using Azure file share and Azure file sync services.

Thanks for reading! Do give feedback and help me make my blogs better.

Until Next Time!!

--

--

Shubhangi Vashist

Security Consultant who loves to write about security and networking related stuff and bake on weekends.