Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streaming InfluxDB data

Tags:

influxdb

I've used influxDB for a while now, but never had to continuously stream data from it. A simple GET /query was sufficient. But now I need a way to stream data to the frontend to draw pretty graphs and such.

So far we've been running GET /query periodically from the frontend, but this is highly inefficient. I would much rather get keep the connection open and receive the data when it's written to the DB. Searching the interwebs there doesn't seem to be support neither for websockets, nor for HTTP/2 in influxDB right now.

So, question to others, who possibly hit this issue - how did you solve this?

like image 702
pinkstone Avatar asked Oct 16 '22 07:10

pinkstone


1 Answers

InfluxDB v1.x supports subscriptions. As data is written to InfluxDB, writes are duplicated to subscriber endpoints via HTTP, HTTPS, or UDP in line protocol.

https://docs.influxdata.com/influxdb/v1.7/administration/subscription-management/

like image 187
Shashank V Avatar answered Oct 21 '22 06:10

Shashank V