influxdb-ruby icon indicating copy to clipboard operation
influxdb-ruby copied to clipboard

Support persistent connections

Open drbrain opened this issue 4 years ago • 1 comments

The released versions of this gem do not support HTTP persistent connections. This causes performance issues due to connection creation overhead and makes writing to the InfluxDB database fail if DNS is down when a new connection needs to be created.

Enabling persistent connections results in a ~9x speed increase allowing points to be written synchronously to a non-localhost influxDB in ~5ms instead of ~50ms for my computer.

This PR also fixes debug logging.

See commit messages for details.

drbrain avatar May 30 '20 08:05 drbrain

I'll note that one of the rubocop failures is for cyclomatic complexity, I seem to recall that similar checks are disabled in other places in the library, would you prefer I disable the check here, or to split the method apart?

drbrain avatar Jun 10 '20 19:06 drbrain