#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit)
#### Type Of Change - [x] refactoring, and better handling of miss configuration
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [] Tested changes locally
#### Description - decouple latency update with congestion control further - decouple congestion control with weighted congestion control and make sure that miss-configuration (no positive weight and/or no cc attributes) are handle gracefully) - fix an error in the doc
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2521
-- Commit Summary --
* dispatcher: congestion control refactoring
-- File Changes --
M src/modules/dispatcher/dispatch.c (72) M src/modules/dispatcher/doc/dispatcher_admin.xml (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2521.patch https://github.com/kamailio/kamailio/pull/2521.diff
@jchavanton pushed 1 commit.
697dc181d8a7dfd02199ea9b305df311506fcd25 dispatcher: congestion control refactoring
@jchavanton pushed 1 commit.
71ea97e2f9caa8b5d59214bfffbe11f232f22478 dispatcher: congestion control refactoring
@jchavanton pushed 1 commit.
5ab8f7528a6c8a8d675f7293d6b7fbe2ff23b212 dispatcher: congestion control refactoring
testing notes :
all GW congested: ``` ds_update_latency(): all gw congested[138][47]latency_avg[249.74][sip:192.0.2.28]code[200]rweight[138/46:48]cms[46] ds_update_latency(): all gw congested[138][46]latency_avg[248.59][sip:192.0.2.29]code[200]rweight[138/46:48]cms[46] ds_update_latency(): all gw congested[138][46]latency_avg[248.63][sip:192.0.2.30]code[200]rweight[138/46:48]cms[46] ``` all congested bellow max threshold: ``` ds_update_latency(): [121]latency[300]avg[280.96][sip:192.0.2.30]code[200]rweight[1]cms[19] ds_update_latency(): [121]latency[300]avg[280.89][sip:192.0.2.28]code[200]rweight[1]cms[19] ds_update_latency(): [121]latency[300]avg[280.93][sip:192.0.2.29]code[200]rweight[1]cms[19] ``` all GW congested with one that was trained : ``` ds_update_latency(): all gw congested[245][500010]latency_avg[1.20][sip:192.0.2.30]code[200]rweight[245/121:32]cms[121] ds_update_latency(): all gw congested[245][40]latency_avg[60.80][sip:192.0.2.28]code[200]rweight[245/62:63]cms[62] ds_update_latency(): all gw congested[245][40]latency_avg[60.85][sip:192.0.2.29]code[200]rweight[245/62:63]cms[62] ``` 2/3 congested with one that was trained : ``` ds_update_latency(): [58]latency[1]avg[78.40][sip:192.0.2.28]code[200]rweight[4]cms[16] ds_update_latency(): [58]latency[1]avg[78.43][sip:192.0.2.29]code[200]rweight[4]cms[16] ds_update_latency(): [500029]latency[0]avg[1.21][sip:192.0.2.30]code[200]rweight[0]cms[20] ```
one GW configured with weight=0 ``` SET: { ID: 1 TARGETS: { DEST: { URI: sip:192.0.2.30 FLAGS: AP PRIORITY: 10 ATTRS: { BODY: rweight=20;weight=20;cc=1 DUID: MAXLOAD: 0 WEIGHT: 20 RWEIGHT: 8 SOCKET: } LATENCY: { AVG: 66.625000 STD: 76.593000 EST: 79.207000 MAX: 151 TIMEOUT: 0 } } DEST: { URI: sip:192.0.2.28 FLAGS: AP PRIORITY: 10 ATTRS: { BODY: rweight=20;weight=20;cc=1 DUID: MAXLOAD: 0 WEIGHT: 20 RWEIGHT: 8 SOCKET: } LATENCY: { AVG: 66.562000 STD: 76.650000 EST: 79.154000 MAX: 151 TIMEOUT: 0 } } DEST: { URI: sip:192.0.2.29 FLAGS: AP PRIORITY: 10 ATTRS: { BODY: rweight=20;cc=1 DUID: MAXLOAD: 0 WEIGHT: 0 RWEIGHT: 20 SOCKET: } LATENCY: { AVG: 66.437000 STD: 76.764000 EST: 79.048000 MAX: 151 TIMEOUT: 0 } } } } ```
@jchavanton pushed 1 commit.
1a29dc28691b5522abe6241a8d840e500ab1e6d7 dispatcher: congestion control refactoring
This is independent of #2493, right? Just to be aware of what still needs to be tacked further...
Otherwise, it can be merged, seems to be code related to congestion control anyhow.
Correct, this is independent. I just noticed that it would be best to improve this before #2493
Yes, it is ready to be merged, the code should not change anything in terms of behavior (except when weight is 0, which was not expected with algo 11), I did enough testing.
Thanks, I will merge it shortly.
@jchavanton pushed 1 commit.
b2cd7018d28569e38d8572d154a2ee1c5c973852 dispatcher: congestion control refactoring
Merged #2521 into master.