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

Article translations Article translations
Article ID: 951764 - View products that this article applies to.
Expand all | Collapse all

On This Page

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:
http://msdn2.microsoft.com/en-us/library/cc150670(VS.85).aspx
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.

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:
http://technet.microsoft.com/en-us/library/bb490943.aspx

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
    Collapse this imageExpand this image
     Start button
    , click All Programs, click Accessories, and then right-click Command Prompt.
  2. Click Run as administrator.

    Collapse this imageExpand this image
    User Account Control permission
    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
    Collapse this imageExpand this image
     Start button
    , click All Programs, click Accessories, and then right-click Command Prompt.
  2. Click Run as administrator.

    Collapse this imageExpand this image
    User Account Control permission
    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:
http://technet.microsoft.com/en-us/library/aa998125(EXCHG.65).aspx

Properties

Article ID: 951764 - Last Review: May 2, 2008 - Revision: 1.1
APPLIES TO
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows Server 2008 for Itanium-Based Systems
Keywords: 
kbrpc kbhowto kbinfo KB951764

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com