Incoming connections to the RPC proxy occur over HTTP. Additionally, they all occur on the same port. (Typically, this port is port 80 or port 443.)
Outgoing connections to the RPC server occur over TCP. Typically, RPC clients use multiple connections to an RPC server. Each connection obtains a new port. As the number of connections from the RPC proxy to the RPC server increases, the port limit on the RPC proxy can be exhausted.
When you enable the port scalability feature, the RPC proxy uses multiple IP addresses in the same interface to try to connect to the RPC server. Each IP address in the interface has a limit of 60,000 ports. This condition enables the proxy server to scale the number of ports that are available. Therefore, the number of connections that the proxy server can make to the RPC server
increases.
To enable the port scalability feature, follow these steps on the server or servers that are running the RPC proxy.
Step 1: Add more IP addresses
When you do this, you enable RPC to take advantage of the port scalability feature. You can use the following formula to calculate how many more addresses to add:
(Number of incoming HTTP connections � 60,000) � 2 = Minimum number of IP address
Note In this formula, the
Minimum number of IP addresses number is rounded up to the nearest integer. For example, if a server is to support 100,000 incoming HTTP connections, calculate the minimum number of addresses as follows:
(100,000 � 60,000) � 2 = 3.3
Then, round 3.3 up to 4. In this example, four IP addresses are needed.
The IP addresses must be added to the interface that you want. For more information about how to add IP addresses by using the
netsh command-line tool, visit the following Microsoft TechNet Web site:
Step 2: Enable RPC proxy port scalability
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756�
How to back up and restore the registry in Windows
To enable RPC proxy port scalability, you must add a registry key. To do this, follow these steps:
- Click Start, click Run, type regedit, and then click OK.
- Locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\RPC
- On the Edit menu, point to New, and then click DWord Value.
- Type EnableTcpPortScaling, and then press ENTER.
- On the Edit menu, click Modify.
- Type 1, and then click OK.
- Exit Registry Editor.
Step 3: Configure the dynamic ports on the RPC proxy server
To do this, follow these steps:
- Click Start, click All Programs, click Accessories, and then right-click Command Prompt.
- Click Run as administrator.
If you are prompted for an administrator password or for confirmation, type the password, or click Continue. - At the command prompt, type the following command, and then press ENTER:
netsh interface ipv4 set dynamicportrange protocol=tcp startport=4000 numberofports=60000
- Type the following command, and then press ENTER:
netsh interface ipv6 set dynamicportrange protocol=tcp startport=4000 numberofports=60000
- Type exit, and then press ENTER.
Step 4: Configure Internet Information Services (IIS)
You must configure IIS to update the concurrent request limit and the maximum number of connections. To do this, follow these steps:
- Click Start, click All Programs, click Accessories, and then right-click Command Prompt.
- Click Run as administrator.
If you are prompted for an administrator password or for confirmation, type the password, or click Continue. - At the command prompt, type the following command, and then press ENTER:
%windir%\system32\inetsrv\appcmd.exe set config "Default Web Site/Rpc" -section:system.webServer/serverRuntime -appConcurrentRequestLimit:Number of incoming HTTP connections -commitpath:apphost
- Type the following command, and then press ENTER:
%windir%\system32\inetsrv\appcmd.exe set config "Default Web Site/RpcWithCert" -section:system.webServer/serverRuntime -appConcurrentRequestLimit:Number of incoming HTTP connections -commitpath:apphost
- Type the following command, and then press ENTER:
%windir%\system32\inetsrv\AppCmd SET SITE "Default Web Site" -limits.maxConnections:Number of Incoming HTTP connections x 2
- Type iisreset, and then press ENTER.
- Type exit, and then press ENTER.
Note In these commands, the value for the
Number of incoming HTTP connections placeholder comes from the formula that is described in the "Step 1: Add more IP addresses" section. The values for the start port and for the number of ports may differ, based on your circumstances and requirements. However, the sum of these values must be less than or equal to 65,535.
For more information about how to configure a server as an RPC proxy server, visit the following Microsoft TechNet Web site: