In a previous post, we have introduced the open source Zen Load balancer software. We have described how to perform a standard installation of the product. We also described a basic configuration where web servers where load balanced through the Zen Load Balancer Software.
In this 2 part post series, I want to describe how you can use the Zen Load Balancer in order to setup an Exchange 2010 infrastructure based on 2 Exchange Servers and achieve high availability.
I.Background info about HA & Exchange 2010
If you have some experience with Exchange 2010, you know that you can achieve high availability of the server roles through different mechanism. The mailbox server roles can be configured in cluster through the Database Availability Group (DAG). The Client Access Servers (CAS) can be grouped in a CAS Array and load balancing software can provide high availability has well.
If you want to use the free Network Load Balancing (NLB) component available within Windows Server operating system, you will need to install a minimum of 4 Exchange servers:
- 2 Exchange servers hosting CAS/HT Role to create the CAS Array infrastructure
- 2 Exchange Server configured as Mailbox servers with DAG Technology enabled.
This is because you cannot have NLB component running on a machine using failover Clustering technology.
However, you can achieve high availability for mailbox roles, Hub transport roles and Client Access roles using 2 Exchange Servers by using a third party load balancer solution. In this post, we will see if the Zen load balancer can be used within an Exchange infrastructure and thus providing a free alternative to other solutions available on the market.
- You can download some load balancer virtual appliance for free but they generally come with a 30 day trial limitation. (Barracuda Networks, Kemps technologies, Citrix Netscaler)
- We are providing here a really simple and basic configuration installation scenario. This post is for demonstration purposes only. Zen load balancer might not have all the features (such as reverse ssl) you might expect.
II.Prepare the Exchange infrastructure
In order to perform this setup, we assume that an Exchange Organization is already in place. We assume that a domain Controller with Global catalog role is installed in the AD site where the exchange is installed. We assume that 2 Exchange servers hosting the Client Access/Hub Transport/mailbox Role are available and already installed. We assume that you have the correct credentials in order to perform the following setup.
The following screenshot describes the Exchange infrastructure that will be used to perform this demonstration. So, we will have only 2 exchange Servers configured will CAS/HT/MBX roles. We will also have our Zen load balancer (virtual) appliance running within the infrastructure.
Click on image for better resolution
When creating a CAS Array, you will need to perform some additional actions after completing the setup of the Exchange Server. You will need to
- Create a DNS Entry for the CAS Array
- Configured Static Ports for MAPI connection and Address book service
- Create the CAS Array object
- Configure mailbox servers to use the CAS Array information
Let’s do this right now !
Step 1 – DNS Entry
In our example, we want to create a cas array called CASARRAY. The IP Address associated to this Array will be set to 192.168.1.200. So, you will simply open your DNS console and create a new Host record.
Step 2 – Configure Static ports for the CAS Array
By default, the CAS Array (or RPC Client Access Service) will be communicating through the port TCP/135 and the dynamic RPC Port range between 6005 and 59530 for outgoing connections when an outlook clients contact the CAS server.
We strongly recommend you to fix MAPI ports. This will limit the number of ports that you will need to enable on your load balancer solution. This will make easier also troubleshooting process given that you know exactly which port you will need to check for mail traffic
In Exchange 2010 SP1, you can fix MAPI ports through the Registry, you will need to block ports for the
- Address Book Service
- MAPI Connections
When fixing MAPI ports, Microsoft recommends you set this to a unique value between 59531 and 60554 and use the same value on all CAS.
Step 2a – Configure Static Port for the Address Book Service
To configure static ports for the Address Book service, perform the following actions on each cas servers
|Configure Static Ports for the Address Book Service|
|Open registry editor (regedit.exe) and browse to the following registry key :
Prior Exchange 2010 SP1, to fix the port you would edit the file Microsoft.exchange.addressbook.service.exe.config located in: “C:\Program Files\Microsoft\Exchange Server\V14\Bin” and set the selected value next to the RcpTcpPort key.
Step 2b – Configure Static Port MAPI Ports
To configure static ports for MAPI connections on each CAS servers, perform the following actions
|Configure Static Ports for MAPI Port|
|Open registry editor (regedit.exe) and browse to the following registry key
Step 3 – Creating the CAS Array
It’s time to create the CAS Array AD object within our Exchange environment. After the creation of the CAS Array, you might need to perform some additional configuration settings based on whether or not you have a mailbox database already present within your Exchange infrastructure.
Step 3a – Create the CAS array Object
- Open your Exchange management shell and issue the following command
New-ClientAccessArray [-Name <String>] -Fqdn <Fqdn> -Site <AdSiteIdParameter>
Step 3b- Checking CAS ARRAY Configuration
After creating the casarray, you should check that this one has been created successfully by issuing the command Get-ClientAccessArray (or Get-ClientAccessArray | fl for more details)
Click on image for better resolution
Step 3c – Set CAS ARRAY value to any existing mailbox database
If a mailbox database existed before the creation of the CAS Array, this mailbox database would use the first CAS Server installed as RPC client Access Server. You will need to change the RpcClientAccessServer attribute on the existing mailbox database within the Active Directory to point to the newly created CAS Array
To set this, you can perform the following actions from the Exchange Management Shell
Get-MailboxDatabase -Server MBX1 | Set-MailboxDatabase -RpcClientAccessServer casarray.c-nergy.lab
III. Final Words
This conclude the first part of this post. At this stage, your exchange 2010 infrastructure should be ready and configured with 2 CAS servers that are configured as a CAS Array. However, no load balancing will occur yet. We will need to configure our Zen load balancer to provide this functionality.
We have avoided (on purpose) to speak about the mailbox server role. Indeed, to test the load balancing functionality, you do not really need to have a fully configured DAG Mailbox server role. If you have only one Mailbox server at this stage, you should be able to validate your Zen load balancer setup. The second part of the post will be looking at how you can configure (a basic configuration) the Zen load balancer software.
We have assumed that the reader has a good working knowledge of Exchange 2010. That’s why we have provided summary information about configuration of the Exchange infrastructure. At a later stage (and enough people ask for it) I might write a more detailed post about how to configure a HA Exchange infrastructure.
Note : if people request so, I might publish on how to for DAG Setup as well
- Exchange 2010 CAS Static Ports : http://social.technet.microsoft.com/wiki/contents/articles/configure-static-rpc-ports-on-an-exchange-2010-client-access-server.aspx