Victoria metrics write api seems sync vs async?

164 views
Skip to first unread message

Maria Abramiuc

unread,
Oct 13, 2020, 7:06:24 AM10/13/20
to victorametrics-users
Hello,

I write data to VictoriaMetrics using http://localhost:8428/write api and right after I read data using http://localhost:8428/api/v1/query_range api. The query_range starts returning data only after 2 seconds since the write.

Is the write api async? Can I configure it to be sync or to have a smaller cache?

Thanks,
Maria

hage...@gmail.com

unread,
Oct 13, 2020, 8:17:54 AM10/13/20
to victorametrics-users
Hi Maria

You might be hitting issue similar to the following https://github.com/VictoriaMetrics/VictoriaMetrics/issues/751
I'd recommend to try the export API to get unmodified previously written data points https://github.com/VictoriaMetrics/VictoriaMetrics#how-to-export-data-in-json-line-format

Maria Abramiuc

unread,
Oct 14, 2020, 9:06:35 AM10/14/20
to victorametrics-users
Hi,

Thanks for the hints, that was exactly my issue. I couldn't really manage to use export API with range vector selectors, it seems to be working good with instant vector selectors, but I do need last_over_time and others.
Setting -search.latencyOffset to a smaller value solved my problem for now.

Best regards,
Maria

Reply all
Reply to author
Forward
0 new messages