Monday, October 15, 2012

Looking at BranchCache for Windows 7 and Windows Server 2008

Print Friendly and PDF
BrancheCache gives users of Windows 7 and Windows Server 2008 R2 increased network responsiveness, by reducing wide area network (WAN) utilization when accessing files from a branch office that are located in a central office.

Enabling BranchCache causes a copy of the file that is accessed from a file or Web server and located in a remote office to be cached in the local branch office. The next time a client requests the file, BranchCache first attempts to retrieve it from the local BranchCache.

BranchCache makes sure clients are authorized by the content server and the files are up-to-date, so  clients never have to worry about retrieving files that are not current.

  • BranchCache clients must be running Windows 7 and the BranchCache feature has to be enabled. 
  • Web servers must be running Windows Server 2008 R2 with the BranchCache feature enabled.

BrancheCache modes

BrancheCache can be operated in two different modes:
  1. Distributed Cache: clients cache a copy of the remote files to be shared with other clients in the same office.
  2. Hosted Cache: a Windows Server 2008 R2 server acts as the host and maintains a central cache of files that are accessed by clients in the same branch office.  

Hosted Cache mode

Branch office clients have the fully qualified domain name (FQDN) of the host configured on their Windows 7 computer so they can easily retrieve the data from the Hosted Cache. 

The Windows 7 client first goes to the content server located in the central office to retrieve the file. 

The server authenticates and authorizes the client, and returns an identifier (content metadata) that the client uses to search for the file on the Hosted Cache. If there is no local Hosted Cache available, the client will go out on the WAN to retrieve the content directly from the content server.

The client contacts the Hosted Cache server using a Secure Sockets Layer (SSL) and offers the content identifiers over the secure SSL connection. The Hosted Cache server connects to the client to retrieve the remaining metadata that it does not have cached so as to be available for the next BranchCache request. 

The next client requesting the same file goes to the content server and the content server again authorizes the user and returns content metadata. Using the metadata, the client requests the data from the Hosted Cache server. The Hosted Cache server returns encrypted data to the client, which the client in turn validates with the hash provided in the content metadata, to ensure the data has not been modified. 

Distributed Cache Mode

In Distributed Cache Mode, Windows 7 clients cache copies of files accessed using the WAN from file servers located on remote networks and sends the files to other Windows 7 clients upon request. Per Microsoft: 
Distributed Cache mode is best suited for branch offices with fewer than 50 users.

The client connects to the content server and requests a file. After the content server authorizes the user, the user retrieves only a file identifier from the remote server. If this is the first time the client has requested the file from the content server, the client caches it using BranchCache. 

A subsequent Windows 7 client requests the same file from the content server. The content server authorizes the user and returns an identifier.

The client broadcasts a request to other Windows 7 clients in the network using the Web Services Dynamic Discovery (WS-Discovery) multicast protocol. 

If any client has a cached copy of the file, the encrypted file is sent directly to the client across the network. 

Distributed Cache mode allows IT professionals to take advantage of BranchCache with minimal hardware deployments in the branch office. However, if the branch has deployed other infrastructure (for example, servers running workloads such as file or print), using Hosted Cache mode may be beneficial for the following reasons:
  • Increased cache availability
  • . Hosted Cache mode increases the cache efficiency because content is available even if the client that originally requested the data is offline.

  • Caching for the entire branch office
  • . Distributed Cache mode operates on a single subnet. If a branch office that is using Distributed Cache mode has multiple subnets, a client on each subnet needs to download a separate copy of each requested file. With Hosted Cache mode, all clients in a branch office can access a single cache, even if they are on different subnets.

How to Configure BranchCache

You can manage BranchCache by using Group Policy or the netsh command line tool to perform the following tasks:

  • Enable BranchCache (disabled by default). 
  • Select Distributed or Hosted Cache mode
  • Indicate the size of the client computers' cache, if using Distributed Cache mode. By default, BranchCache uses up to 5% of the hard drive for cache
  • Indicate the location of the Hosted Cache, if using Hosted Cache.

How to Install the BranchCache feature on a Web Server or Hosted Cache Server (hosted cache mode) to allow BranchCache clients to cache files on IIS websites hosted on a server

Use the Add Features Wizard of Server Manager to install the BranchCache feature.
  1. Start ->  Administrative Tools -> Server Manager 
  2. Right click Features and then select Add Features
  3. Select BranchCache and click Next
  4. In the Confirm Installation Selections, click Install
  5. In the Installation Results dialog box, after you confirm BranchCache is installed successfully, click Close

How to Install BranchCache on a File Server (to allow shared files to be cached by BranchCache clients)

To enable BranchCache for any file shares, you need to install the File Services server role on the file server and add the BranchCache For Network Files role service. Use the Add Roles Wizard of Server Manager to install the File Services role and the BranchCache for Network Files role service.

Configure BranchCache Servers using Group Policy

  1. Start\Administrative Tools\Group Policy Management Console
  2. Select the domain for the GPO (in the console tree) or choose Local Computer Policy
  3. Create a new GPO by selecting New in the Action menu
  4. Right click the GPO and click Edit
  5. Click Computer Configuration\Policies\Administrative Templates\Network and then click LanMan Server
  6. Double-click Hash Publication For BranchCache
  7. Click Enabled
  8. You can choose one of the following options:
    1. Allow hash publication for all file shares
    2. Allow hash publication for file shares tagged with Windows Branch Cache support
    3. Disallow hash publication on all file shares

Configure BranchCache Clients using Group Policy

Group Policy settings are located in:

 Computer Configuration\Policies\Administrative Templates\Network\BranchCache

You must first create a Group Policy object (GPO), then enable BranchCache and choose Distributed or Hosted Cache mode.
  1. Start\Administrative Tools\Group Policy Management Console
  2. Select the domain for the GPO (in the console tree)
  3. Create a new GPO by selecting New in the Action menu
  4. Choose a GPO name and click OK
  5. Right click the GPO and click Edit
  6. Click Computer Configuration\Policies\Administrative Templates: Policy Definitions (ADMX files) retrieved from the local machine\Network and then click BranchCache
  7. Double-click Turn on BranchCache
  8. Click Enabled and then OK
  9. To use Distributed Cache mode or Hosted Cache mode, double click Turn on Branch Cache - Distributed Caching mode or Turn on Branch Cache - Hosted Cache mode. Click Enabled and then OK.
  10. To enable BranchCache for SMB traffic, double-click BranchCache for network files and click Enabled. Select a latency value under Options and click OK.

Client Configuration
BranchCache in Windows 7 and Windows Server 2008 R2 Overview

No comments:

Post a Comment

"Comment As:" anonymous if you would rather not sign into an account!