

# Routing layer metrics reference for database cluster groups for Aurora

A database cluster group for Aurora publishes routing layer metrics to CloudWatch. These metrics show the statement traffic, latency, connections, and errors that your applications see at the routing endpoint of a database cluster group. Routing layer metrics apply to database cluster groups that use Aurora MySQL. Aurora publishes these metrics only when routing is turned on for the database cluster group. Each member cluster keeps publishing its standard Aurora metrics; for those, see [Amazon CloudWatch metrics for Amazon Aurora](Aurora.AuroraMonitoring.Metrics.md).

Routing layer metrics are in the `AWS/RDS` namespace, under the `DbClusterGroupId` and `HostType` dimensions, where `HostType` is `router`. For how to filter by dimension, see [Dimensions](databaseclustergroups-metrics.md#databaseclustergroups-metrics-dimensions). Each router publishes its own data points, and no dimension identifies a single router, so for count metrics only the `Sum` statistic gives the group total. For more information, see [Monitoring Amazon Aurora metrics with Amazon CloudWatch](monitoring-cloudwatch.md).

## Statistics and units
<a name="databaseclustergroups-metrics-reference-statistics"></a>

Each metric supports the statistics that fit how Aurora records it:
+ **Count metrics** record events, such as statements or failed sign-ins. Use the Sum statistic.
+ **Level metrics** record a point-in-time value, such as the number of open connections. Each router samples its own value. Average is the mean value of a single router, and Maximum is the value on the busiest router. No statistic gives the group total, so don't use Sum for level metrics.
+ **Latency metrics** record a distribution of values. These metrics support the p50, p90, and p99 percentiles, plus the Average and Maximum statistics.

Most latency metrics are in Milliseconds and include fractional values, so Aurora doesn't round sub-millisecond latency down to 0. `RouterProcessingLatency` and `RouterConnectionHandshakeLatency` are in Microseconds.

## Throughput metrics
<a name="databaseclustergroups-metrics-reference-throughput"></a>

The routing layer reports throughput as a per-second count. To get the routing layer's per-second throughput for the database cluster group for Aurora, use the Sum statistic over a one-minute period and divide by 60.


| Metric | Description | Units | Statistics | 
| --- | --- | --- | --- | 
| RouterQueryThroughput | The number of client requests that the routing endpoint receives per second. Each text query and each prepared-statement execution counts as one request. | Count | Sum | 
| RouterSelectThroughput | The number of SELECT statements that the routing endpoint receives per second. | Count | Sum | 
| RouterInsertThroughput | The number of INSERT statements that the routing endpoint receives per second. | Count | Sum | 
| RouterUpdateThroughput | The number of UPDATE statements that the routing endpoint receives per second. | Count | Sum | 
| RouterDeleteThroughput | The number of DELETE statements that the routing endpoint receives per second. | Count | Sum | 
| RouterDMLThroughput | The combined number of INSERT, UPDATE, and DELETE statements that the routing endpoint receives per second. | Count | Sum | 

## Latency metrics
<a name="databaseclustergroups-metrics-reference-latency"></a>

Aurora measures round-trip latency at the routing endpoint, from when a client statement arrives to when the response returns to the client.


| Metric | Description | Units | Statistics | 
| --- | --- | --- | --- | 
| RouterQueryLatency | The round-trip latency of all client statements that pass through the routing endpoint. | Milliseconds | p50, p90, p99, Average, Maximum | 
| RouterSelectLatency | The round-trip latency of SELECT statements. | Milliseconds | p50, p90, p99, Average, Maximum | 
| RouterInsertLatency | The round-trip latency of INSERT statements. | Milliseconds | p50, p90, p99, Average, Maximum | 
| RouterUpdateLatency | The round-trip latency of UPDATE statements. | Milliseconds | p50, p90, p99, Average, Maximum | 
| RouterDeleteLatency | The round-trip latency of DELETE statements. | Milliseconds | p50, p90, p99, Average, Maximum | 
| RouterDMLLatency | The combined round-trip latency of INSERT, UPDATE, and DELETE statements. | Milliseconds | p50, p90, p99, Average, Maximum | 
| RouterProcessingLatency | The time that the routing layer processing adds to each statement, not counting any network latency. Use this metric to separate routing overhead from member cluster time and network overhead. | Microseconds | p50, p90, p99, Average, Maximum | 

## Connection metrics
<a name="databaseclustergroups-metrics-reference-connections"></a>


| Metric | Description | Units | Statistics | 
| --- | --- | --- | --- | 
| RouterClientConnections | The number of client connections to the routing endpoint, including connections that are still in setup. | Count | Average, Maximum | 
| RouterToMemberConnections | The number of sessions between the routing layer and member clusters that are open or opening. | Count | Average, Maximum | 
| ActiveRouterToMemberConnections | The number of sessions between the routing layer and member clusters that have a statement, batch, or handshake in progress. | Count | Average, Maximum | 
| RouterPinnedConnections | The number of member cluster sessions that are currently held as pinned sessions for clients. | Count | Average, Maximum | 
| RouterConnectionAttempts | The number of client connection attempts that the routing endpoint receives, counted before connection setup begins. | Count | Sum | 
| RouterAbortedClients | The number of established client connections that the routing layer closed abnormally. A connection dropped because its member cluster session was lost, for example during a failover, usually isn't counted. | Count | Sum | 
| RouterConnectionHandshakeLatency | The time to fully establish a client connection, including TLS negotiation and authentication. Aurora records one value for each connection. | Microseconds | p50, p90, p99, Average, Maximum | 

## Error metrics
<a name="databaseclustergroups-metrics-reference-errors"></a>


| Metric | Description | Units | Statistics | 
| --- | --- | --- | --- | 
| RouterQueryRoutingErrors | Statements that the routing layer couldn't route, including statements that it couldn't parse. | Count | Sum | 
| RouterLoginFailures | Client sign-ins that failed, for any reason. This count includes authentication errors and sign-ins that time out because the client stops responding during the TLS handshake or sign-in. | Count | Sum | 