Skip to main content
Version: edge

binflux

The binflux codec is a binary representation of the influx line protocol.

It exhibits significantly faster serialization performance, taking less space on the wire.

The format does not include framing and SHOULD be used with size-prefix processors.

For all numerics network byte order is used (big endian).

Data Representation

  1. 2 byte (u16) length of the measurement in bytes
  2. n byte (utf8) the measurement (utf8 encoded string)
  3. 8 byte (u64) the timestamp
  4. 2 byte (u16) number of tags (key value pairs) repetitions of:
    1. 2 byte (u16) length of the tag name in bytes
    2. n byte (utf8) tag name (utf8 encoded string)
    3. 2 byte (u16) length of tag value in bytes
    4. n byte (utf8) tag value (utf8 encoded string)
  5. 2 byte (u16) number of fiends (key value pairs) repetition of:
    1. 2 byte (u16) length of the tag name in bytes
    2. n byte (utf8) tag name (utf8 encoded string)
    3. 1 byte (tag) type of the field value can be one of:
    4. TYPE_I64 = 0 followed by 8 byte (i64)
      1. TYPE_F64 = 1 followed by 8 byte (f64)
      2. TYPE_TRUE = 2 no following data
      3. TYPE_FALSE = 3 no following data
      4. TYPE_STRING = 4 followed by 2 byte (u16) length of the string in bytes and n byte string value (utf8 encoded string)

Origins

The format originated with tremor as an efficient alternative to the influx codec.