-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache /get_transactions
call on lastblocks
collector
#4
Comments
note that looking at
even though when we divide count by time,
I don't think we can do much about |
depending on the scraping interval, it can be somewhat expensive on
monerod
to serve the requests it takes frommonero-exporter
.it we look at the
lastblocks
collector'sfetchData
(when it reaches out tomonerod
), we can note the call to/get_transactions
passing the hash of every transaction included in that block:monero-exporter/pkg/collector/collector_lastblock.go
Lines 79 to 82 in 652cf40
as we expect blocks to arrive every 2min, a prometheus instance configured with a polling interval of 15s would be making 8 times more calls to that endpoint than it really should (as they'll all return the same answer).
in that case, because the call
/get_block
is made using a hash (rather than a height), we could cache the response fromget_transactions
for such block, thus reducing the load onmonerod
.The text was updated successfully, but these errors were encountered: