Step-by-Step: Accelerating the Cloud with “BranchCache” in Windows Server 2012 [ 20 Key Scenarios with Windows Azure Infrastructure Services ]

This month, my fellow IT Pro Technical Evangelists and I are authoring a new articles series on 20 Key Scenarios with Windows Azure Infrastructure Services.  You can catch the full series at https://aka.ms/CloudTop20.  In today's article in this series, we'll discuss accelerating content on cloud-based web and file servers using Windows Server 2012 BranchCache.  Once implemented, this solution can dramatically improve the user experience when accessing content servers in the cloud across high-latency, low-bandwidth Internet connections. 

Traditional file sharing protocols, such as Server Message Block ( SMB ) in Windows Server 2012, are primarily designed for low-latency, high-bandwidth scenarios commonly found in Local Area Networks ( LANs ).  When attempting to move file server workloads to the cloud, many IT Pros find that the unpredictable latency and limited bandwidth related to most Internet connections can make it challenging to deliver file services from the cloud in a reliable manner.

Lab Scenario

In this Step-by-Step article, I’ll walk through a configuration that leverages the BranchCache feature available in Windows Server 2012 and Windows 8 Enterprise.  Once implemented, BranchCache can solve cloud networking challenges by implementing a Wide Area File Services ( WAFS ) solution that caches frequently accessed data locally, either in a Distributed Cache across local clients or on a local Hosted Cache Server.

image

Lab Scenario: BranchCache Accelerating Content Access from the Cloud

In this configuration, BranchCache has been tested to deliver up to a 2,000:1 reduction in network traffic by avoiding retransmission of common data blocks over unpredictable Internet and Wide Area Network ( WAN ) connections.

How does BranchCache Work in a Cloud Scenario?

Although originally intended for accelerating content access between main corporate data centers and branch office locations, BranchCache works equally well for accelerating content access from the cloud.  When accelerating content over high-latency network connections, BranchCache operates in the following manner …

image

General Operation of BranchCache

  1. Client attempts to access file(s) located on SMB file share on remote BranchCache-enabled content server.   A BranchCache-enabled content server could be Windows Server 2012 or Windows Server 2008 R2 file servers and web servers.
     
  2. Remote BranchCache-enabled content server responds back with a list of IDs for each block of content. This list of IDs is substantially smaller ( as much as 2,000:1 smaller ) than the actual content blocks being requested.
     
    New in Windows Server 2012 – BranchCache uses variable-sized content block “fingerprints” to better accelerate network communications when dealing with incremental changes to files and common blocks of data across files.
     
  3. Client checks for presence of content blocks on a local hosted cache server or in the distributed cache of other BranchCache-enabled clients.   If other BranchCache-enabled clients have previously requested this data, it will be found in these local caches.
     
    New in Windows Server 2012 – BranchCache automatically stores cached content in an encrypted format for improved security ( without the need to configure BitLocker ).  In addition, for scaling BranchCache hosted cache servers in large sites, multiple hosted cache servers can be enabled and client access requests will be automatically scaled across them.
     
  4. Client retrieves requested data locally from local hosted cache server or the distributed cache of other BranchCache-enabled clients.   This can provide tremendous network bandwidth savings as well as the user perception of a much faster network connection for retrieving commonly access blocks of content.

For a more detailed description of BranchCache, see BranchCache Overview in the Microsoft TechNet Library.

What happens if a BranchCache Hosted Cache Server goes offline?

In the process above, you may notice that the local Hosted Cache Server is accessed “out-of-band" to the original SMB file content request made to the remote server, rather than being “in-band” to the original request issued in Step 1.  BranchCache operates in this manner so that the local Hosted Cache Server does not represent a possible “point-of-failure” in accessing this content.  If the local Hosted Cache Server is offline, BranchCache-enabled clients will continue to access the requested content directly from the remote content server via SMB, albeit without any acceleration applied to the request.

If desired, multiple Hosted Cache Servers can be configured at larger sites to provide continuous BranchCache acceleration even if a single Hosted Cache Server is unexpectedly offline.  In addition, Hosted Cache and Distributed Cache modes can be combined so that BranchCache performs a “fallback” to BranchCache-enabled Distributed Cache clients in the event that an active Hosted Cache Server cannot be located.

Which BranchCache configuration should I use?

BranchCache can be configured in two “modes” of operation: Distributed Cache and Hosted Cache Server.  These modes can be used independently, or both modes can be used together for increased flexibility.

  • Distributed Cache – each client caches their frequently accessed content blocks in a local content cache and then shares this cache will other BranchCache-enabled clients on the local subnet via a peer distribution protocol.  BranchCache-enabled clients dynamically discover and share this “distributed” cache with other BranchCache-enabled clients.
     
  • Hosted Cache Server – one or more Hosted Cache Servers are configured on the local network and BranchCache-enabled clients are directed to these Hosted Cache Servers for accelerating content access requests via group policies.

Distributed Cache mode is a great solution for small, single subnet remote office locations, whereas Hosted Cache Servers are the better option for larger, multi-subnet offices.

As a best practice, you may choose to enable BranchCache clients for both Hosted Cache Server and Disributed Cache modes together – clients will try to locate and leverage Hosted Cache Servers first, but will fallback to using Distributed Caching if no Hosted Cache Servers can be contacted.

How do I get started?

To get started with implementing this lab scenario, you’ll need a Windows Azure subscription with the Virtual Machines preview feature enabled.

Good news! You can get a Windows Azure subscription for FREE by leveraging our FREE 90-Day Trial Subscription program.  This program is a great way to evaluate Windows Azure and it provides up to 750 compute hours and 35GB of replicated cloud storage per month for 90-Days for FREE!

NOTE: When activating your FREE 90-Day Subscription for Windows Azure, you will be prompted for credit card information.  This information is used only to validate your identity and your credit card will not be charged, unless you explicitly convert your FREE Trial account to a paid subscription at a later point in time.

I’ve got my Azure subscription … Now What?

Once you’ve activated your Windows Azure subscription, you can follow the steps below to build your BranchCache solution to accelerate cloud content access:

  1. Extend your Active Directory to the Cloud via a Windows Azure Virtual Network.
     
    DO IT: Step-by-Step – Extend On-Premise Active Directory to the Cloud with Windows Azure
     
  2. Add a new Windows Server 2012 member server VM to the Windows Azure Virtual Network and Active Directory domain that you extended in Step 1 above.
     
    NEED HELP? Complete this training on Windows Azure Virtual Machines and Virtual Networks for assistance.
     
  3. Enable the server roles and role services required for BranchCache-enabled SMB Content Servers on the Azure VM provisioned in Step 2 above.
     
    DO IT:  Install a New File Server as a BranchCache Content Server.
     
  4. On the BranchCache-enabled SMB Content Servers, define one or more shared folders that are enabled for BranchCache.
     
    DO IT: Enable BranchCache on a File Share
     
  5. Add a new Windows Server 2012 member server on-premise in your Active Directory domain.
     
    NEED HELP? Check out our “Early Experts” Installer Quest for assistance.
     
  6. Enable and register the server roles required for BranchCache-enabled Hosted Cache Servers on the new server provisioned in Step 5 above. 
     
    DO IT: Deploy Hosted Cache Servers
     
  7. Enable the BranchCache group policy items for enabling your BranchCache clients for both Hosted Cache Server and Distributed Cache modes.
     
    DO IT: Use Group Policy to Configure BranchCache Clients
     
  8. Verify your BranchCache client settings to ensure that clients are configured properly for BranchCache.
     
    DO IT: Verify BranchCache Client Settings

Completed! You have successfully configured BranchCache to accelerate Cloud content access.

What’s Next? Keep Learning!

After completing this Do-It-Yourself article, continue learning about Windows Server 2012 and the Windows Azure Cloud Platform with these additional resources:

  • Windows Server 2012 “Early Experts” Cloud Quest – Join us and study Windows Server 2012 hands-on while leveraging the Windows Azure cloud platform.  Along the way, you’ll build a complete virtual network with Active Directory, iSCSI Storage and Clustered Servers!
     
  • Cloud Labs – Choose from a variety of hands-on lab scenarios on Windows Server 2012, SharePoint 2013, System Center 2012 SP1, SQL Server 2012, Windows 8 and more!

How are you leveraging the Cloud?

Do you have unique use case scenarios or business requirements for cloud solutions? Feel free to share your comments, experiences and questions below!

See you in the clouds!

- Keith