View a markdown version of this page

Proxy metrics - ELB for Envoy

Proxy metrics

ELB for Envoy publishes data points to CloudWatch for your proxies. CloudWatch lets you retrieve those data points as an ordered set of time-series data, known as metrics. You use metrics to confirm that a proxy is performing as you expect.

You can create a CloudWatch alarm that watches a single metric. The alarm can send a notification or take an action when the metric crosses a threshold that you set.

A proxy reports metrics to CloudWatch only when requests are flowing through the proxy. CloudWatch reports no metrics for a period in which there is no data to report.

The following table lists the metrics that a proxy publishes to CloudWatch, with the most meaningful statistic for each metric.

Metric Description Statistic
Requests
RequestCount The number of requests the proxy completed. Omits connections reset before any response was sent. Sum
Response codes returned to clients (downstream)
HTTPCode_Downstream_2XX_Count The number of HTTP 2XX responses returned to clients, including responses the proxy generated. Sum
HTTPCode_Downstream_3XX_Count The number of HTTP 3XX responses returned to clients, including responses the proxy generated. Sum
HTTPCode_Downstream_4XX_Count The number of HTTP 4XX responses returned to clients, including responses the proxy generated. Sum
HTTPCode_Downstream_5XX_Count The number of HTTP 5XX responses returned to clients, including responses the proxy generated. Sum
Response codes from targets (upstream)
HTTPCode_Upstream_2XX_Count The number of HTTP 2XX responses generated by targets. Sum
HTTPCode_Upstream_3XX_Count The number of HTTP 3XX responses generated by targets. Sum
HTTPCode_Upstream_4XX_Count The number of HTTP 4XX responses generated by targets. Sum
HTTPCode_Upstream_5XX_Count The number of HTTP 5XX responses generated by targets. Sum
Connection and TLS errors
UpstreamConnectionErrorCount The number of connections from the proxy to targets that failed to establish. Sum
ClientTLSNegotiationErrorCount The number of TLS connections from clients that failed to establish a session. Sum
UpstreamTLSNegotiationErrorCount The number of TLS connections from the proxy to targets that failed to establish a session. Sum
Latency
UpstreamResponseTime The time elapsed from when the request leaves the proxy until the proxy receives a response from the target. Average
Note

The HTTPCode_Downstream_* metrics count every response returned to clients, including responses the proxy generates. The HTTPCode_Upstream_* metrics count only responses the targets produce. Comparing a class across the two families indicates roughly where a response originated, but the match is not exact. The proxy does not publish 1XX counts, and the response classes do not sum exactly to RequestCount, which omits connections reset before any response.

If you migrate from an Application Load Balancer, note that a proxy does not publish HTTPCode_ELB_4XX_Count or HTTPCode_ELB_5XX_Count. Use the HTTPCode_Downstream_4XX_Count and HTTPCode_Downstream_5XX_Count totals instead.

Note

A proxy reports UpstreamResponseTime in milliseconds. If you migrate from an Application Load Balancer, note that the equivalent metric, TargetResponseTime, is reported in seconds.

Statistics

CloudWatch provides statistics based on the metric data points that a proxy publishes. The following statistics are the most useful for proxy metrics.

  • Sum is the total of the values over the period. It is the most meaningful statistic for the count metrics, such as RequestCount and the HTTPCode_* metrics.

  • Average is the sum divided by the sample count. Use it for the latency metric UpstreamResponseTime.

  • Minimum, Maximum, and SampleCount are also available, but they are less useful for the count metrics.