I want to use InfluxDB to store the views of many different pages (millions of unique pages). Each page got his own unique identifier (pageId) and some metadata eg.:
pageId : “12345xyc”
The key ( for search and count operations within a period) should be the pageId of course.
Currently i use a simple java-backend for this like:
WriteApiBlocking writeApi = this.influxDBClient.getWriteApiBlocking(); Point point = Point.measurement("pageview").addField("tenant_id", "default") .addTag("title", "MyTitle").addTag("url", "MyUrl") .addTag("referrer", "MyReferrer") .addTag("pageId","12345xyc") .time(Date.toInstant(), WritePrecision.MS); writeApi.writePoint(point); }
This doesn’t work as expected and is not performant (i try to use it with Grafana).
My question is now: What is the best way to store this views and the connected metadata (tags,measurement and fields) ?
Thank you very much!