anchor.diff:  title: Using Weighted Routing (Beta)
   owner: Routing
   ---
  +
  +<style>
  +.app-a {
  +	color: #0065d5;
  +}
  +
  +.app-b {
  +	color: #971922;
  +}
  +
  +</style>
   
   This topic provides information about weighted routing and how to configure weighted routing for your apps.  
   
  
positive.code: 
   _weight of app_ / _sum of the weights of all apps mapped to route_
  
  Consider an example in which two apps are mapped to the same route: <font color="red"><code>app-a</code></font> and <font color="blue"><code>app-b</code></font>. The percentage of requests for <font color="blue"><code>app-b</code></font> is calculated as follows:
  
  <font color="blue">weight of <code>app-b</code></font> / ( <font color="red">weight of <code>app-a</code></font> + <font color="blue">weight of <code>app-b</code></font> )
  
  The following table uses example values to show how the percentage of requests is calculated for the two apps: 
  
  
negative.code: 		<th>Percentage of Requests</th>
  	</tr>
  	<tr>
  		<td><code class="app-a">app-a</code></td>
  		<td><code class="app-a">1</code></td>
  		<td><code class="app-a">1</code> / ( <code class="app-a">1</code> + <code class="app-b">3</code> )</td>
  		<td><code class="app-a">25%</code></td>
  	</tr>
  	<tr>
  		<td><code class="app-b">app-b</code></td>
  		<td><code class="app-b">3</code></td>
  		<td><code class="app-b">3</code> / ( <code class="app-a">1</code> + <code class="app-b">3</code> )</td>
  		<td><code class="app-b">75%</code></td>
  	</tr>
  </table>
  
  