BranchCache – Course 102: Distributed Mode

Distributed Cache mode of BranchCache is the most easy to implement mode and it doesn’t require any infrastructure presence in the branch office. We will be discussing this mode of operation in this post.

The Story of Bob

Bob walks at the office 7 AM in the morning, fires up his windows 7 PC and wants to download the company newsletter that is hosted on a remote BranchCache enabled server in the main office. Since he is configured to use BranchCache, his laptop will start downloading identifiers or hashes that describe the data instead of the data itself and those identifiers are so small (Step 1).

So he pulls down those very quickly (couple of kilobytes) and he uses them to do something called multicast shout searching for a peer on the local subnet in the branch that has already downloaded that data (step 2). But since he is the first one who views this content, he shouts, nobody there, so he goes back to the WAN link and does a complete download of the data (Step 3).

It takes a little bit longer but once he is done, his computer keeps that data locally so that it can be made available to other peers.


Now, 15 minutes later, Alice comes at the office, fires her Windows 7 computer, and tries to access the same newsletter; she downloads the identifiers (Step 4), does a multicast shouts (Step 5). Bam… finds Bob PC, and downloads the content very quickly (Step 6).

You can see that you don’t need to have any servers in the branch office. All what need to be done, is to enable BranchCache on those branch clients which can be done easily via group policies.

Keep in mind that you need some disk space on client machines to host cache files, and some extra processing to reply to cache request from neighbor machines. Also you can notice that cache availability in the branch will drop when laptops go offline or hibernate. This mode of operation is recommended for branches up to 50 machines for Windows 7, but this has been changed in Windows 8.

This is part of the story. If you are interested to know more about this nice technology, come here again and filter posts with (BranchCache) tag.

2 comments on “BranchCache – Course 102: Distributed Mode

  1. Salam Ammar,

    I’m a bit confused on the default settings for SMB Latency in Windows 7. The default is 80ms but usually we will bring it down even to latency=1 or 0 in our test environment. How about in a slow link site, how do we know what is the latency to set on each of Windows 7 PC? And why is it so important to set the latency in order for us to use the BranchCache?


  2. First thing, thank you for taking time to read and ask such question. Remember that BranchCache is a technology that is designed to work for different networks regarding size and topology.

    Imagine you have a two datacenters with two branches. One branch has a good connectivity with data center 1. It is not logical for clients to cache content from datacenter 1, while it makes sense to clients in branch 2 with big latency.

    You may ask, well i do not see why it is bad for clients in branch 1 to cache content from data center 1 although the latency is good. Here is where the argument exists.
    BranchCache has a cost especially in distributed mode. Machines will always listen to network broadcasts or multicast, and need portion of processing power to compute hashes and server neighbor requests, and also disk space to save all files generated from this operation. If there are many machines on the same subnet participating on the same distributed mode BranchCache party, then that party will be noisy if you know what i mean. Windows 8 though introduces more scalablity for such big subnet BranchCache parties.

    So what you can do now? you configure latency so that clients in Branch 1 will not cache content from datacenter 1 while they will cache content from datacenter 2 where latency is high.

    Finally putting latency = 0 means always cache regardless of latency. Remember that usually takes three clients to download the same content to start caching.

    “Unless hashes are generated in advance on the content server, only the third client asking for the same content will actually be able to retrieve it from a peer or from the HC (hosted cache) server.
    – First client gets only the content (and no hashes), as the content server generates the hashes and stores them locally
    – Second client gets the hashes – but no one else has them in the branch, so ends up getting the content from the content server
    – Only the third client gets the hashes and is able to retrieve the content inside the branch, because now another client (for distributed mode) or the HC server (for HC mode) have the hashes as well.

    I hope this helps really.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s