are primarily used as a relay to the actual influxdb. The free influx db does not provide the high availability function. We use influxdb-relay or influxdb-srelay as the relay to the actual influxdb. With this approach your data can be saved in multiple influxdb copies. That’s the main purpose, but here are some difference between them.
Influxdb-relay :
can support HTTP & UDP protocol .
Only supports write operation, it does not support query.
The destination backend set is fixed.
Have a cache to store data when the backend is down temporarily. If the backend is down for too long, the cache will not be able to handle as it’s an in memory cache.
Influxdb-srelay:
Only support HTTP protocol.
Having a routing rule to route traffic to different backend destinations.
Can support /query action.
Does not have cache option, if it can’t send data to backend, it will not retry.
What should we use?
We can use influxdb-relay for write operation as it supports caching data and supports both UDP & HTTP
We can use influxd-srelay for query option so we can distribute the query traffic among instances.