Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to enable the port scalability feature for RPC proxies and for applications in Windows Server 2008


View products that this article applies to.

Introduction

Windows Server 2008 provides support for more than 64,000 wildcard ports. To support this number of ports, multiple IP addresses are employed. Additionally, a special socket option is passed to enable the same wildcard port to be used across multiple IP addresses. Up to 60,000 dynamic ports may be used per IP address.

For more information about this port scalability feature, visit the following Microsoft Web site: The remote procedure call (RPC) process uses this feature to let RPC proxies take advantage of port scalability on servers that are running Windows Server 2008. To take advantage of this feature, you must modify the RPC proxy.

This article describes how to enable the port scalability feature for RPC proxies and for applications in Windows Server 2008.

↑ Back to the top


More information

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:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\RPC
  3. On the Edit menu, point to New, and then click DWord Value.
  4. Type EnableTcpPortScaling, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. Type 1, and then click OK.
  7. Exit Registry Editor.

Step 3: Configure the dynamic ports on the RPC proxy server

To do this, follow these steps:
  1. Click Start
    , click All Programs, click Accessories, and then right-click Command Prompt.
  2. Click Run as administrator.

    If you are prompted for an administrator password or for confirmation, type the password, or click Continue.
  3. At the command prompt, type the following command, and then press ENTER:
    netsh interface ipv4 set dynamicportrange protocol=tcp startport=4000 numberofports=60000
  4. Type the following command, and then press ENTER:
    netsh interface ipv6 set dynamicportrange protocol=tcp startport=4000 numberofports=60000
  5. 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:
  1. Click Start
    , click All Programs, click Accessories, and then right-click Command Prompt.
  2. Click Run as administrator.

    If you are prompted for an administrator password or for confirmation, type the password, or click Continue.
  3. 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
  4. 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
  5. 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
  6. Type iisreset, and then press ENTER.
  7. 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:

↑ Back to the top


Keywords: KB951764, kbinfo, kbhowto, kbrpc

↑ Back to the top

Article Info
Article ID : 951764
Revision : 2
Created on : 5/2/2008
Published on : 5/2/2008
Exists online : False
Views : 496