anchor.diff:  ---
  -title: Configuring Apps to Listen on Custom Ports (Beta)
  +title: Configuring CF to Route Traffic to Apps on Custom Ports (Beta)
   owner: Routing
   ---
   
  -This topic describes how to configure your apps to listen for traffic on custom ports. 
  -
  -<p class="note"><strong>Note</strong>: This is a beta feature. Some of the API endpoints described in this topic are not yet considered generally available.</p>
  +This topic describes how to configure Cloud Foundry to route traffic to your apps listening on custom ports. 
   
   ## <a id="overview"></a> Overview
   
  -By default, apps only receive requests on port 8080 for both HTTP and TCP routing. Configuring custom app ports allows developers to bring workloads onto Cloud Foundry (CF) that listen on ports other than 8080. Here are some example use cases:
  +By default, apps only receive requests on port 8080 for both HTTP and TCP routing, and so must be configured (or hard coded) to listen on this port. Configuring custom app ports allows developers to bring workloads onto Cloud Foundry (CF) that listen on ports other than 8080. Here are some example use cases:
   
   * Serving web client requests on one port and offering stats/debug on another
   * Using TCP protocols that require multiple ports 
  
positive.code: Before following the procedure to configure routing to your app on custom ports, you must have the following:
  
  * An app pushed to PCF that can listen on one or more custom ports. 
  * **TCP only**: Routes mapped to each port you want your app to listen on. 
  	For example, if you want your app to receive TCP connections on ports `1234` and `5678`, create two TCP routes:
  	* One that maps `example.com:FIRST-RANDOM-PORT` to app port `1234`
  	* Another that maps `example.com:SECOND-RANDOM-PORT` to app port `5678`
  
  ## <a id="procedure"></a> Procedure
  
  
negative.code: 	</tr>
  	<tr>
  		<td>Backend port</td>
  		<td>The port on the VM where an app container is hosted, which is unique to the container</td>
  		<td>Gorouter to Diego Cell</td>
  	</tr>
  	<tr>
  		<td>App port</td>
  		<td>The port on the container; this should match a port the app is configured to listen on</td>
  		<td>Diego Cell to app container</td>
  	</tr>
  </table>
  
  The following diagram provides an example data path and Network Address Translation for TCP Routing. For HTTP Routing, the Route Port is always 80 or 443.  
  
  ![Traffic-flow-diagram](route_ports.png)
  
  