Hello, Cloud Gurus,
and welcome back for this lesson,
where we're going to take a look
at how you can enhance the performance
of your Windows file server shares
across slower network links.
Let's take a look at what we're going to cover.
First up, I'll briefly introduce BranchCache.
We'll take a look at how BranchCache works
and then we'll explore what's required
to configure BranchCache.
And then we'll wrap up with a demo
of implementing and testing BranchCache.
All right, let's get started.
Let's first take a moment to understand BranchCache.
BranchCache improves the performance of web, application,
and file servers over slower network links,
and BranchCache was originally designed
for slower wide area networks, but it's found a new purpose
as a caching tool for cloud hosted servers,
where you might have clients located
at multiple branch offices
and their servers have now been moved to Azure.
Bandwidth between servers in the cloud
and workstations at branch offices
is generally lower than that of a local area network.
Another advantage of BranchCache
is that BranchCache reduces the amount of data
you need to transmit out of an Azure network.
And as you might be familiar,
outbound Azure network bandwidth is billable.
Where BranchCache is really useful
is where multiple clients will access the same data.
For example, when you're deploying software updates
that need to be applied to all client computers
at a branch office.
And you can use BranchCache with a server
at the branch office in hosted cache mode.
With this mode,
clients will retrieve data from the designated cache servers
in their Active Directory site.
The advantage of this mode is that you can preload data
on the hosted cache servers,
or you can use BranchCache without a server
at the branch office in distributed cache mode.
With distributed cache mode, clients retrieve their data
from other clients in the same subnet, if that data exists.
Let's take a look at how this works.
BranchCache works with content servers
like file servers and web servers,
and these servers might be located at another site
or hosted in the cloud.
And there might be a slower network link
between these servers and your clients,
and by default, this link must have a latency
of at least 80 milliseconds or higher,
but you can configure this value.
In distributed mode,
when the first BranchCache enabled client accesses content
from the BranchCache enabled content server,
it will cache the content it receives
up to the configured limit.
And then when the second client accesses the same data,
the BranchCache enabled content server
will return a list of hashes.
And the client uses the segment IDs of those hashes
to locate content on client computers at the branch office.
And then the client will transfer data from the local client
and use the remote content server for any missing content.
And hashes from the original content server
are always checked against the data received from clients,
to ensure the correct data is received.
And because hashes are much smaller
than the actual content they're copying,
the performance is improved.
In hosted cache mode,
you can deploy a server at the branch office
and you can pre-cache content on that server.
And the clients will always check the content server
for the content, but they can then receive the content
from the local hosted cache server
using the hashes sent from the content server.
All right, now let's take a look at what's required
to configure BranchCache.
You can use BranchCache
with professional versions of Windows 10 or 11,
but that is limited to transfers using BITS,
which is commonly used for the distribution of software
or operating system updates.
You'll need to use Enterprise edition
for all other protocols, including file shares using SMB
or web servers using HTTP.
And all of the latest versions
of Windows Server are supported
and there's no additional requirements for Windows Server.
There are a couple of steps in the process
for configuring BranchCache though,
and these high-level steps
are worth remembering for the exam.
Remembering the difference between hosted cache
and distributed cache mode.
You start by installing and configuring the content servers
and this includes configuring the server
to host the file share or a webpage
and enabling BranchCache on that content server,
and then configuring it to generate hashes.
Then you optionally deploy hosted cache servers.
And then you also optionally pre-hash and preload content
on those hosted cache servers, if you are using that mode.
And then you finally configure the BranchCache
client computers.
Now the configuration of both clients
and the content servers can be done using Group Policy,
which we'll take a look at in the demo.
All right, let's take a look at a demo
of configuring BranchCache in distributed mode.
In this demo, we will enable the BranchCache role server
on our content server,
which is a file server named CORP-BNE-FS01.
And then we'll use our administrative server,
CORP-BNE-ADM01, to take a look at the Group Policy settings
for BranchCache servers and BranchCache clients.
And then we will test BranchCache
using 2 client computers.
We'll first access the data using Client 1,
and then we'll access the data on Client 2,
and use Performance Monitor to observe the results.
Let's take a look at the demo.
All right, so here I am logged onto CORP-BNE-FS01,
and I'm going to go ahead and install
the File Server role service
and the File Server BranchCache role service.
And we'll also include the management tools.
Go ahead and run that.
This will just take a moment to install,
so I'll speed this up.
All right, that installation's now complete.
Now I'm going to run a Group Policy update
to update the Group Policy on this server,
and then I'll show you the Group Policy
I've configured in just a moment.
So we'll just run gpupdate /force,
and this will just take a moment to update,
so I'll speed this up as well.
And now we're going to slow down the network traffic
from this server using SMB bandwidth limits.
So to do that, we're going to install the file server
SMB bandwidth feature, using Install-WindowsFeature.
And this will just take a moment to install,
so I'll speed this up as well.
And now I'm going to go ahead and set an SMB bandwidth limit
on this file server.
And I'm going to do that
using the set SMB bandwidth PowerShell cmdlet,
and I'll use the category of default to catch all traffic,
and I'll set the bytes per second to one megabyte.
And that'll just help us
measure the difference in performance using BranchCache
and not using BranchCache.
All right, now let's jump over to our administrative server
and take a look at the group policy settings
that I've configured.
So here I am on the administrative server,
and I've got an organizational unit for our file servers,
and I've got a File Server Group Policy object.
Let's take a look at the settings I've configured.
So if I navigate into Computer Configuration, Policies,
and then Administrative Templates,
and then down to Network Lanman Server.
And you can see here
that I've got the Group Policy configured
to allow hash publication,
which is used by BranchCache for all shared folders.
Now let's take a look at the client configuration.
So if I navigate
into the domain workstation's organizational unit,
and then we've go to workstation's GPO,
and if I navigate into Computer Configuration, Policies,
Administrative Templates, and then Network BranchCache.
And you'll note that clients are configured
using the network BranchCache quick policy node,
whereas servers are configured
using the Lanman Server setting.
So don't get caught out by that on the exam.
I'll navigate back to work stations
and then we'll navigate back into BranchCache again.
And you can see I've configured
the BranchCache client settings here,
including turning on BranchCache,
and then specifying how much disk space
on the clients can be used.
The default is 5%, but I've upped it to 10% for this demo.
I've configured that we're not using hosted cache mode
because we don't have a hosted cache server deployed,
but we are using distributed cache mode
with our 2 clients.
And I've set the round trip maximum latency in milliseconds
to zero; the default is 80 milliseconds,
but for our test environment,
we need this to be as low as possible.
All right, now let's jump across to Client1.
So here we are on Client1,
and we've got an ISO on the file server,
and we're going to download that file using PowerShell.
And we're going to use the measure command,
PowerShell cmdlet,
and then we're going to start a BITS transfer
and we're going to specify the source file as the ISO file
and the destination as C drive.
We'll go ahead and run that command.
And the reason I'm using the measure command
PowerShell cmdlet
is because this will give us a good indication
of how long the BITS transfer takes to copy
from our file server to our client.
This will just take a moment to copy,
so I'll come back when this is done
and we'll take a look at the results.
All right, that copy is finished running
and we can see it took about 3 and a half minutes
to complete the copy.
All right, now let's jump across to Client2
and we'll run the same copy.
So here we are on Client2,
and we'll just run exactly the same command again.
And we'll also open Performance Manager
to observe the results.
So I'll just launch Performance Manager.
This will just take a moment to copy,
so I'll come back when this is done.
All right, that copy is now complete,
and we can see how much data is copied
from the distributed client cache,
and how much data was copied from the server.
And the reason there's such a large difference here
is because the amount of data that we've configured
to copy down to our client computers
and the size of this ISO file.
And if I just minimize Performance Monitor,
you can see that the total minutes to copy the data
was about the same using BranchCache
and not using BranchCache.
And to be honest,
that's probably due to the slower processes that I'm running
in these client computers,
because there are encryption and decryption processes
that need to run
as part of the BranchCache copy process.
All right, that concludes this demo.
Let's wrap up with a bit of a summary
of what we've covered in this lesson.
All right, so what have we covered?
BranchCache can be used to reduce bandwidth requirements
by caching content locally,
and BranchCache is ideal for software distribution
and operating system updates.
And you can use hosted cache mode
if you want to ensure that all clients
see improved performance,
including the first client that accesses the content.
Otherwise, you can use distributed cache mode
if you don't want to manage servers at the branch office,
but the first client will see reduced performance
and it will cache the content.
It's also important that Windows 10 or Windows 11 Enterprise
is required for HTTP and SMB traffic.
All right, that concludes this lesson.
Thanks for being with me
and I hope you found it useful.
And I look forward to seeing you on the next lesson.