如何知道要熔断的请求拥塞

How to know the request to fuse is congested

我是熔断新手。我有 2 个问题:

  1. 我可以只设置 congestion_threshold 本身的值而不更改默认值 max_background 吗?
  2. 如果pending和processing队列中的异步请求数量达到可调拥塞阈值参数的值,我怎么知道它拥塞了?在哪里查看日志记录? dmesg?

未经测试,看源码好像有这样一个单独的选项:https://github.com/libfuse/libfuse/blob/master/lib/helper.c#L90:

    CONN_OPTION("congestion_threshold=%u", congestion_threshold, 0),
    CONN_OPTION("congestion_threshold=", set_congestion_threshold, 1),

同样从代码来看,您似乎可以使用 fuse_parse_conn_info_opts 对其进行配置。见 https://github.com/libfuse/libfuse/blob/master/include/fuse_common.h#L523:

 * The following options are recognized:
 *
...
 *   -o max_background=N    sets conn->max_background
 *   -o congestion_threshold=N  sets conn->congestion_threshold
...
 **/
struct fuse_conn_info_opts* fuse_parse_conn_info_opts(struct fuse_args *args);

查看内核代码,没有显示实际发生的拥塞。