---
title: "Comment by Ehsan on \"Changing a threshold without detaching XDP, and events that cannot flood\" | Hashnode"
description: "Keeping the threshold in a BPF map so you never detach XDP is a nice fix. When a link degrades, does GCRA drop the noisy burst fast enough that the Prometheus a"
url: "https://hashnode.com/posts/changing-a-threshold-without-detaching-xdp-and-events-that-cannot-flood/6afee680f7c5713dfb060187/comment/6b000e5ba33f96a400bdb3ef"
---

[Discussion](https://hashnode.com/posts/changing-a-threshold-without-detaching-xdp-and-events-that-cannot-flood/6afee680f7c5713dfb060187)

Comment [Changing a threshold without detaching XDP, and events that cannot flood](https://hashnode.com/posts/changing-a-threshold-without-detaching-xdp-and-events-that-cannot-flood/6afee680f7c5713dfb060187)

[Ehsan](https://hashnode.com/@ibuildinpublic)

[1d ago](https://hashnode.com/posts/changing-a-threshold-without-detaching-xdp-and-events-that-cannot-flood/6afee680f7c5713dfb060187/comment/6b000e5ba33f96a400bdb3ef)

Keeping the threshold in a BPF map so you never detach XDP is a nice fix. When a link degrades, does GCRA drop the noisy burst fast enough that the Prometheus alert still fires on the real counts?

[Nathanael FETUE](https://hashnode.com/@nathanael-fetue)

[23h ago](https://hashnode.com/posts/changing-a-threshold-without-detaching-xdp-and-events-that-cannot-flood/6afee680f7c5713dfb060187/comment/6b000e5ba33f96a400bdb3ef#reply-6b0028f620343d339bba5859)

Thanks for reading it this closely, good question!

The alert doesn't depend on GCRA at all. Every slow request is counted before the limiter gets involved, so the counter always has the real number. GCRA only decides how many JSON lines get written. The alert reads the counter, so it still fires on the real counts.

The only place I can lose events is earlier, if the kernel ring buffer or the analysis queue fills up. I count those losses separately and have an alert on them, because that's exactly when things are going badly. I haven't tested this on real hardware yet, only on my Soft-RoCE testbed, so I'm curious whether you've seen it behave differently in practice.
