From 2cbd411a9a1a99fac58c72e8f8eb92c156513900 Mon Sep 17 00:00:00 2001 From: Joe LeGasse Date: Fri, 23 Sep 2016 13:22:03 -0400 Subject: [PATCH] client: updated README for UDP point splitting --- CHANGELOG.md | 1 + client/README.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8a21c5aca3..a33d29795d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - [#7136](https://github.com/influxdata/influxdb/pull/7136): Update jwt-go dependency to version 3. - [#6962](https://github.com/influxdata/influxdb/issues/6962): Support ON and use default database for SHOW commands. - [#7268](https://github.com/influxdata/influxdb/pull/7268): More man pages for the other tools we package and compress man pages fully. +- [#7305](https://github.com/influxdata/influxdb/pull/7305): UDP Client: Split large points. Thanks @vlasad ### Bugfixes diff --git a/client/README.md b/client/README.md index e11eaee93f5..e55c43657f4 100644 --- a/client/README.md +++ b/client/README.md @@ -255,6 +255,28 @@ func WriteUDP() { } ``` +### Point Splitting + +The UDP client now supports splitting single points that exceed the configured +payload size. The logic for processing each point is listed here, starting with +an empty payload. + +1. If adding the point to the current (non-empty) payload would exceed the + configured size, send the current payload. Otherwise, add it to the current + payload. +1. If the point is smaller than the configured size, add it to the payload. +1. If the point has no timestamp, just try to send the entire point as a single + UDP payload, and process the next point. +1. Since the point has a timestamp, re-use the existing measurement name, + tagset, and timestamp and create multiple new points by splitting up the + fields. The per-point length will be kept close to the configured size, + staying under it if possible. This does mean that one large field, maybe a + long string, could be sent as a larger-than-configured payload. + +The above logic attempts to respect configured payload sizes, but not sacrifice +any data integrity. Points without a timestamp can't be split, as that may +cause fields to have differing timestamps when processed by the server. + ## Go Docs Please refer to