Observing resource metrics
In Chapter 2, Defining Boundaries and Letting Go, we covered the importance of observability and the distinction between work and resource metrics. Work metrics identify the behavior of the system from the perspective of the end user, whereas resource metrics provide the low-level supporting details. For each resource, following the USE method, we are interested in its utilization, whether it is saturated, and its error rate. Our datastores are arguable the most important resources. Let's dig into their capacity, throttling, error, and performance metrics.
Capacity
One of the most important decisions we make when we provision a datastore is how much capacity to allocate. For a serverless database, such as Amazon DynamoDB, storage is allocated automatically and we just specify the number of reads and writes needed per second. Other services follow a more traditional approach, such as Elasticsearch, where we need to specify the cluster size and proactively...