anchor.diff:  1. Infrastructure
       - Load Balancer
       - Network
  -2. Platform - PCF
  +2. Platform - CF
       - Gorouter
       - Diego Cell(s)
  -3. Applications
  +3. Application
   
   In the **Infrastructure**, 502's can occur in the following way:
   
  -- From the Load Balancer, 502's can surface when the Gorouters are not receiving traffic.
  +- From the Load Balancer, 502's can surface when the Gorouters are not receiving traffic at all.
       - This can be observed if the Load Balancer is logging 502's but the Gorouters are not.
   
   In the **Platform**, 502's can occur in the following ways:
   
   - If the Gorouter is unable to connect to the application container:
  -    - TCP dial issues (can't make an initial connection to the [backend](https://docs.pivotal.io/pivotalcf/2-1/concepts/http-routing.html#back-end)). This may be due to:
  -		- An application that is unresponsive (which indicated an issue with the application)
  -		- The Gorouter has a stale route (which indicateds an issue with the application)
  -		- The application container is corrupted (which indicated a problem with the platform)
  +    - TCP dial issues (can't make an initial connection to the [backend](https://docs.cloudfoundry.org/concepts/http-routing.html#back-end)). The Gorouter will retry TCP dial errors up to three times, if it still fails then a 502 will be returned to the client and logged to the `access.log`. This may be due to:
  +		- An application that is unresponsive (which indicates an issue with the application)
  +		- The Gorouter has a stale route (which indicates an issue with the platform)
  +		- The application container is corrupted (which indicates a problem with the platform)
   		- These types of errors may look like this within the `gorouter.log`:
       <pre class="terminal">
       [2018-07-05 17:59:10+0000] {"log_level":3,"timestamp":1530813550.92134,"message":
  
positive.code: 
  <strong><%= modified_date %></strong>
  
  This topic helps operators to better understand if 502's are a result of the PCF Platform or an application.
  
  ## <a id="points-of-failure"></a> Points of Failure
  
  
negative.code: 
  Error Type | Status Code | Source of Issue | Evidence
  ------------ | ------------- | ------------- | -------------
  Dial | 502 | Application or Platform | logs with error `dial tcp`
  ConnectionResetOnRead | 502 | Application or Platform | logs with error `read: connection reset by peer`
  AttemptedTLSWith<br/>NonTLSBackend | 525 | Platform* | - logs with error `tls: first record does not look like a TLS handshake`<br/> - `backend_tls_handshake_failed` metric increments
  HostnameMismatch | 503 | Platform | - logs with error `x509: certificate is valid for <x> not <y>`<br/> - `backend_invalid_id` metric increments
  UntrustedCert | 526 | Platform | - logs with an error prefix `x509: certificate signed by unknown authority`<br/> - `backend_invalid_tls_cert` metric increments
  RemoteFailedCertCheck | 496 | Platform | logs with error remote `error: tls: bad certificate`
  ContextCancelled | 499 | Client/App | logs with error `context canceled`
  RemoteHandshakeFailure | 525 | Platform | - logs with error remote `error: tls: handshake failure`<br/> - `backend_tls_handshake_failed` metric increments
  *Note: any platform issue could be the result of a misconfiguration
  
  For each of the above errors, there will be a `backend-endpoint-failure` log line in `gorouter.log` and an error message in `gorouter.err.log`. Additionally, the [`access.log`](https://github.com/cloudfoundry/gorouter#logs) will record the request status codes.
  