spin_bit

Introduction

This library is a tiny C++ header implementation of spin bit based RTT measurements in network traffic.

The design is inspired by QUIC, and based on Piet De Vaere's master thesis.

Overview

The spin bit is a single bit that the client in a network connection sends, and the server reflects back. When the client receives a bit with the same value it has sent, it flips the bit for the next packet it sends. In this way, an observer in the middle can infer a round-trip and time it accordingly.

However, the spin bit mechanism is not robust in the face of packet re-ordering or outright loss. To mitigate this, the above master thesis introduces an additional two bits of Vector Edge Counter (VEC), the value of which permits determines whether an edge of a spin bit signal is valid.

This library implements the spin bit + VEC algorithm on the sender and receiver side, and provides a “generator” that additionally produces matching packet numbers. It also provides a basic observer, and a VEC-based observer for analysing round-trip times.

The spin_bit library is built for use in channeler.