Module: kamailio
Branch: master
Commit: c2bde271f9d606e6cef987a223f746092c59d306
URL: https://github.com/kamailio/kamailio/commit/c2bde271f9d606e6cef987a223f7460…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-07T12:02:04+02:00
dispatcher: docs for algorithm 64 - round robin with overload control
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c2bde271f9d606e6cef987a223f7460…
Patch: https://github.com/kamailio/kamailio/commit/c2bde271f9d606e6cef987a223f7460…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 83ef06285a0..979b59798af 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1418,6 +1418,13 @@ With congestion control the formula becomes :
</programlisting>
</example>
</listitem>
+ <listitem>
+ <para>
+ <quote>64</quote> - round-robin (next destination) with over
+ load control (destination record is skipped based on over
+ load control rate).
+ </para>
+ </listitem>
<listitem>
<para>
<quote>X</quote> - if the algorithm is not implemented, the
@@ -2388,6 +2395,14 @@ kamctl rpc dispatcher.hash 4 bob server.com
<listitem>
<para>'latency' - latency_stats initialization in ms.</para>
</listitem>
+ <listitem>
+ <para>'ocmin' - minimum limit for over load control rate
+ (value between 0 and 100, default 10).</para>
+ </listitem>
+ <listitem>
+ <para>'ocrate' - over load control rate
+ (value between 0 and 100, default 100).</para>
+ </listitem>
</itemizedlist>
</para>
</section>
Module: kamailio
Branch: master
Commit: 199f7cc4f29e6bab5f462d0db1942a8a583f8a67
URL: https://github.com/kamailio/kamailio/commit/199f7cc4f29e6bab5f462d0db1942a8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-07T11:40:17+02:00
dispatcher: set DS_ALG_OVERLOAD to 64 to be able to use as a flag
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff: https://github.com/kamailio/kamailio/commit/199f7cc4f29e6bab5f462d0db1942a8…
Patch: https://github.com/kamailio/kamailio/commit/199f7cc4f29e6bab5f462d0db1942a8…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 0466f09d9d4..d3ddb81ee82 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -79,7 +79,7 @@
#define DS_ALG_RELWEIGHT 11
#define DS_ALG_PARALLEL 12
#define DS_ALG_LATENCY 13
-#define DS_ALG_OVERLOAD 14
+#define DS_ALG_OVERLOAD 64 /* 2^6 - can be also used as a flag */
#define DS_HN_SIZE 256
@@ -2618,7 +2618,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
return -1;
xavp_filled = 1;
break;
- case DS_ALG_OVERLOAD: /* 14 - round robin with overload control */
+ case DS_ALG_OVERLOAD: /* 64 - round robin with overload control */
lock_get(&idx->lock);
hash = idx->last;
idx->last = (idx->last + 1) % idx->nr;