If it ain’t broke, make it faster.
I’m writing a sharding StatsD proxy as a way to learn the Rust programming language. This is just a toy project, but I’m treating it as if it were something I’d run in production where I care about performance.
This proxy can be used to spread StatsD message load across N downstream servers (ie. Telegraf with the StatsD input plugin). However, due to the way metrics are stored in a timeseries database like InfluxDB, we need to ensure consistent hashing. You can think of it as an AWS Load Balancer with sticky sessions enabled. The proxy must always forward the same StatsD message – a measurement and it’s unique tags+values – to the same downstream server.
Continue reading