forked from lesovsky/pgscv
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Throttling
Mikhail Grigorev edited this page Jan 27, 2025
·
2 revisions
When scraping metrics from /metrics
and /metrics?target=XXX
endpoints is very frequent, it can create an extra load on the database.
This can happen when we use a cluster version of VictoriaMetrics where different vmagents (from different availability zones) access one pgSCV for data.
If you set the throttling_interval
parameter (environment variable PGSCV_THROTTLING_INTERVAL
), any attempt to get metrics from the /metrics
and /metrics?target=XXX
endpoints will return an empty result (http code 200), and the connection to the database will not be established.
This way we can guarantee that any metrics collection agent will not be able to get data more often than once every throttling_interval
seconds.