Safely sample production data into pre-production environments with Logstash
Oct 1, 2024

Summary
This post details a Logstash configuration that uses UDP for pipeline-to-pipeline communication to sample production data into a pre-production environment. It highlights the risks of blocking data flow when multiple outputs are used in a single pipeline and presents a UDP-based solution as a lightweight alternative to the output isolator pattern. The solution involves a Ruby filter for random sampling and a UDP output in the production pipeline, with a UDP input in the pre-production pipeline. It emphasizes that UDP does not guarantee delivery and is suitable for sampling rather than duplicating data.