BranchCache in Microsoft Windowws Server 2012

What is BranchCache?
BranchCache is a WAN optimization technology that is built into Server 2012. It enables remote offices to access centralized file-shares over the wide area network at faster speeds and using less bandwidth. This type of solution to remote office WAN optimization are collectivity known as “wide area files services” or WAFS solutions. They are traditionally expensive so it is a great to have a solution included in the box with Windows Server.

To optimize WAN bandwidth when users access content on remote servers, BranchCache copies content from your main office servers and caches the content at branch office locations, allowing client computers at branch offices to access the content locally rather than over the WAN. Further BranchCache de-duplicates the data that it transfers across the wire saving bandwidth.

Microsoft BranchCache works for the following types of WAN traffic

  • MS IIS Servers w/ BranchCache feature installed
  • MS File Servers w/ BranchCache feature installed
  • Application servers that utilizes BITS, Background Intelligent Transfer Service

BranchCacheOperationModesBranchCache operates in one of two modes:

  • Distributed cache mode. In this mode, branch office client computers download content from the content servers in the main office and then cache the content for other computers in the same branch office. Distributed cache mode does not require a server computer in the branch office.
  • Hosted cache mode. In this mode, branch office client computers download content from the content servers in the main office, and a hosted cache server retrieves the content from the clients. The hosted cache server then caches the content for other client computers.

 

BranchCache Improvements in Windows Server 2012 & Windows 8

There have been a significant number of improvements as we move to BranchCache in Server 2012 that substantially increase performance, manageability, scalability, and availability. Here is a short list of improvements:

  • Office sizes and the number of branch offices are not limited. BranchCache supports any number of offices of any size when you deploy hosted cache mode with multiple hosted cache servers.
  • There is no requirement for a Group Policy Object (GPO) for each office location, streamlining deployment. A single GPO that contains a small group of settings is all that is required to deploy BranchCache in any size organization, from a large enterprise to a small business.
  • Client computer configuration is automatic. Clients can be configured through Group Policy as distributed cache mode clients by default, however they will search for a hosted cache server – and if one is discovered, clients automatically self-configure as hosted cache mode clients.
  • BranchCache uses Windows file server’s file de-duplication technology to divide files into small pieces and eliminate duplicates. This greatly increases the chance of finding duplicate pieces in independent files, resulting in greater bandwidth savings. BranchCache is also more tolerant of small changes in large files. In addition, file division calculations are performed only one time. When a client computer that is running Windows 8 downloads content from a file server or web server that is running Windows Server 2012 and is using new Data Deduplication technology, there is no need for BranchCache to spend CPU cycles calculating how to divide the content – because the file server and web server have already made these calculations.
  • Offline creation of content information. When you deploy a BranchCache enabled file server or Web server as a content server, content information is calculated offline, well before a BranchCache client requests a file. This provides faster performance and more bandwidth savings, because content information is ready for the first client that requests the content and calculations have already been performed.
  • Cache Encryption. Cached data is now stored encrypted by default. This allows you to ensure data security without using drive encryption technologies.
  • Cache preloading. New tools are available that allow you to load cacheable content onto hosted cache servers before the content is requested by client computers. You can preload content from media, such as DVDs or hard disks, or you can transfer the content over the network to the hosted cache server.
  • BranchCache is now manageable with PowerShell and Windows Management Instrumentation (WMI). This enables scripting and remote management of BranchCache content servers, hosted cache servers, and client computers.

How to Setup and use BranchCache
While there are several ways to accomplish setting up a BranchCache, below I will detail how to configure a file share Using BranchCache.

Setup your File Server for BranchCache
First you need to install the BranchCache feature on your file server. You can do this from Server Manager or from PowerShell.

imageClick image for full size view

PowerShell Commands:

  • Install-WindowsFeature BrancheCache –IncludeManagementTools
  • Install-WindowsFeature FS-BranchCache –IncludeManagementTools
  • Install-WindowsFeature FS-Data-Deduplication -IncludeManagementTools
  • Restart-Computer

Next we create a file share that is BranchCache Enabled. (It will create the fie hashes)

image Click image for full size view

Verify the Status of your File Share Server by typing the following command at the Windows PowerShell prompt, and then press ENTER.

  • Get-BCStatus

image Click image for full size view

Deploy a Hosted Cache Server
On the computer that you want to configure as a hosted cache server, run the following command at a Windows PowerShell prompt to install the BranchCache feature.

  • Install-WindowsFeature BranchCache -IncludeManagementTools

Configure a domain joined computer as a hosted cache server, and to register a service connection point in Active Directory for automatic hosted cache server discovery by client computers, type the following command at the Windows PowerShell prompt, and then press ENTER.

  • Enable-BCHostedServer -RegisterSCP

Verify the correct configuration of the hosted cache server, type the following command at the Windows PowerShell prompt, and then press ENTER.

  • Get-BCStatus

 

Lastly you need to configure the Windows 8 Client to use BranchCache

To configure the client computer for BranchCache hosted cache mode, type the following PowerShell command, and then press ENTER.

  • Enable-BCHostedClient

Verify the configuration of the client by typing the following command at the Windows PowerShell prompt, and then press ENTER.

  • Get-BCStatus

That is it – hope you enjoy your WAFS solution with BranchCache!

-Brian