I have a situation where I want to track page views, click events, etc. in a time series database but am having scalability issues in the case where I want to retrieve aggregated groups of data that has very high cardinality.
The problems I'm trying to solve are:
What are the top N referrers within a given time range?
How many views does a URL have for each URL within a given time range?
How many views do specific URLs have throughout all time?
The schema I have so far is:
timestamp
- Time of the event
domain
- The Base URL for the record
uri
- The unique resource. Would like grouped counts of these (Millions of possible values)
referrer
- the HTTP referrer. Grouped counts of these as well (Millions of possible values)
event
- The type of event
So far I've tried using InfluxDB, but discovered issues due to the sheer amount of possible values for the uri
and referrer
. Although I would only be scanning for record within a small time range, grouping by millions of unique possible values makes this a lot harder. What other options do I have to store data that support both the write/query requirements?