la 负载均衡算法中采样大小能否增加gflags调节
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
LocalityAwareLoadBalancer中对某个节点的请求统计个数定死了128(RECV_QUEUE_SIZE). 如下面一段代码所示
这里有个疑问是为什么不能直接 _time_q(SIZE),即_time_q自己管理内存?
如果OWN_STORAGE,是否就可以直接通过gflags在构造函数中定义好_time_q的size?
```cpp
butil::BoundedQueue _time_q;
TimeInfo _time_q_items[RECV_QUEUE_SIZE];
_time_q(_time_q_items, sizeof(_time_q_items), butil::NOT_OWN_STORAGE) ;
```
**Describe the solution you'd like (描述你期望的解决方法)**
希望能够支持gflags调节 _time_q size
**Describe alternatives you've considered (描述你想到的折衷方案)**
_time_q(SIZE)
**Additional context/screenshots (更多上下文/截图)**
无
Contributor guide
Research direction
Start at LocalityAwareLoadBalancer and the RECV_QUEUE_SIZE/BoundedQueue setup shown in the issue. Review how _time_q storage is owned and how gflags are defined and consumed, then establish that the sample size can be configured while preserving the queue's memory behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100