From the course: Prometheus Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

How does Prometheus storage work?

How does Prometheus storage work?

From the course: Prometheus Essential Training

How does Prometheus storage work?

- [Instructor] Our next aim is to understand how to scale Prometheus. There are a couple of useful tips to pass across, but the first step on this journey is to understand how Prometheus is able to store your metrics in the time series database. This is very important to understand for a simple reason, script time series are first stored in computer memory. If your metrics are not set up right, you will run into memory issues when you try to scale. So how does Prometheus storage work? Well, the timestamp to value mapping of time series, which are called samples, are stored in chunks in memory. In the time series database, Prometheus then uses a hash of the metric labels to find the chunks of samples for a given time series. Each chunk contains a series of samples for a specific time range. Prometheus creates a chunk every two hours for each time series, and then each chunk can only hold up to 120 samples. The interval for creating the chunks is aligned with the world clock. If a chunk…

Contents