CQ vs Kapacitor

How the best fast between CQ or Kapacitor?

Hi Alvianno,
do you want to know which one is the fastest ?

That depends on what you want to achieve.

Moving small amounts of data from one RP to another would be fine with a CQ. If you have a lot of data, then use Kapacitor.

When the CQ runs it adds load to Influx which can lead to it running out of memory, espcecially if you are running several queries say every 30 minutes - you run the risk of finding yourself in the situation where the queries take longer than the time interval you set which results in them never completing (and again, resulting in OOM issues).

Add that to any dashboards that are querying the data as well as any general writes that are taking place and you will notice a definite drop in performance overall.

CQ’s will only run the DB node they’re defined on as well, so if you were lucky enough to have the Enterprise licensing and a cluster, you still can’t split the load.

In my opinion, if you want to do any moderate to high down smampling or any complicated aggregations/data manipulation then Kapacitor is the way to go. You can do it all using a TICK script which is much easier to update/edit and is a lot tidier than hammering out CQ’s in InfluxCLI. That’s how i do it anyway.

The following articles may help clear up the differences

kapcitor and CQ’s
Batch Vs Streaming tasks

Really, it isn’t an easy question to answer as it depends on what you are wanting to achieve and the available resources (memory/CPU/disk).

I’d recommend the two articles mentioned and if you need more help then come back and explain what you want to achieve and provide some sample data :slight_smile:

Thanks @philb :grinning: