Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fordsfords committed Aug 26, 2024
1 parent c43fdf5 commit 07617a6
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 5 deletions.
53 changes: 50 additions & 3 deletions html/configuring-udp-based-transports.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ <h1>Configuring UDP-Based Transports</h1>
    • <a href="#receiver-socket-buffer">Receiver Socket Buffer</a><br />
    • <a href="#transmission-window">Transmission Window</a><br />
    • <a href="#source-side-filtering-lbt-ru">Source-Side Filtering (LBT-RU)</a><br />
    • <a href="#source-socket-buffer-lbt-ru">Source Socket Buffer (LBT-RU)</a></p>
    • <a href="#source-socket-buffer-lbt-ru">Source Socket Buffer (LBT-RU)</a><br />
    • <a href="#dro-peer-link">DRO Peer Link</a><br />
        • <a href="#special-peer-link-considerations">Special Peer Link Considerations</a></p>
<!-- TOC created by './mdtoc.pl kb/configuring-udp-based-transports.md' (see https://github.com/fordsfords/mdtoc) -->
<!-- mdtoc-end -->
<p><a id="introduction"></a></p>
Expand Down Expand Up @@ -110,7 +112,9 @@ <h2>Data Rate Limit and Rate Interval</h2>
<a href="https://ultramessaging.github.io/currdoc/doc/Config/grptransportlbtrmoperation.html#transportlbtrmrateintervalcontext">transport_lbtrm_rate_interval (context)</a> (<a href="https://ultramessaging.github.io/currdoc/doc/Config/grptransportlbtruoperation.html#transportlbtrurateintervalcontext">RU</a>)
according to the procedure listed in
<a href="https://ultramessaging.github.io/um_kb/html/packet-loss.html#decrease-packet-rate-using-rate-limiter">Decrease Packet Rate Using Rate Limiter</a>.</p>
<p>Note that
<p>Note that the default value for the data rate limiter is 10 megabits/sec,
which is almost certainly too low for most real-world use cases.</p>
<p>Also note that
<a href="https://ultramessaging.github.io/currdoc/doc/Design/advancedoptimizations.html#smartsources">Smart Sources</a>
do not support data rate limits.
To minimize the chances of packet loss and <a href="nak-storms.html">NAK storms</a>,
Expand Down Expand Up @@ -140,7 +144,7 @@ <h2>Transmission Window</h2>
<pre><code>(peak_message_rate * avg_message_size) * (initial_nak_backoff + 3*nak_backoff + 2*max_round_trip)
</code></pre>
<p>For example, a peak message rate of 80,000 msgs/sec, average message size of 600 bytes,
initial NAK backoff of .09 sec, nak_backoff of .2 sec, round trip time of 0 (assume no WAN):</p>
initial NAK backoff of .09 sec, nak_backoff of .2 sec, round-trip time of 0 (assume no WAN):</p>
<pre><code>(80,000 * 600) * (.09 + .6) = 33,120,000
</code></pre>
<p><a id="source-side-filtering-lbt-ru"></a></p>
Expand All @@ -157,6 +161,49 @@ <h2>Source Socket Buffer (LBT-RU)</h2>
For example, if you expect 8 subscribers to join the source,</p>
<pre><code>1000000 + 100000 * 8 = 1800000
</code></pre>
<p><a id="dro-peer-link"></a></p>
<h2>DRO Peer Link</h2>
<p>The
<a href="https://ultramessaging.github.io/currdoc/doc/Design/fundamentalconcepts.html#umrouter">UM Dynamic Routing Option (DRO)</a>
can be configured for a
<a href="https://ultramessaging.github.io/currdoc/doc/Gateway/droarchitecture.html#udppeerlink">UDP Peer Link</a>.
This peer link uses the same underlying protocols and code base as the LBT-RU transport type.
However, because it is not associated with regular UM sources and receivers,
it must be configured using the DRO's XML configuration file,
and the configuration options are somewhat different.</p>
<p>The <a href="https://ultramessaging.github.io/currdoc/doc/Gateway/xmlconfigurationreference.html#droelementudp">Router Element &quot;<udp>&quot;</a>
element has children elements that specify the LBT-RU operating parameters.</p>
<p>For example,
<a href="https://ultramessaging.github.io/currdoc/doc/Gateway/xmlconfigurationreference.html#droelementpeerratelimit">Router Element &quot;<peer-rate-limit>&quot;</a>
has attributes that control the rate limiter. For example:</p>
<pre><code>&lt;portals&gt;
&lt;peer&gt;
...
&lt;udp&gt;
...
&lt;peer-rate-limit data=&quot;10000000&quot; retransmit=&quot;5000000&quot; interval=&quot;100&quot;/&gt;
&lt;/udp&gt;
&lt;/peer&gt;
...
&lt;/portals&gt;
</code></pre>
<p>This is the equivalent of:</p>
<pre><code>context transport_lbtru_data_rate_limit 10000000
context transport_lbtru_retransmit_rate_limit 5000000
context transport_lbtru_rate_interval 100
</code></pre>
<p><a id="special-peer-link-considerations"></a></p>
<h3>Special Peer Link Considerations</h3>
<p>When configuring a UDP peer link for a pair of DROs,
all the same considerations must be made as are discussed in this article.
However, pay special attention to the items that include network round-trip time,
such as NAK backoff times and transmission window.
For DROs that are widely separated, larger values for both are generally advised.</p>
<p>Also, to ensure a lossless utilization, you should divide up the available bandwidth
and limit each app that sends over the WAN to its share of the bandwidth using
UM's rate limiter.
See
<a href="https://ultramessaging.github.io/um_kb/html/packet-loss.html#decrease-packet-rate-using-rate-limiter">Decrease Packet Rate Using Rate Limiter</a>.</p>
<hr>
<p>KB <a href="home.html">Home</a> | <a href="index.html">Index</a></p>
<p>UM <a href="https://ultramessaging.github.io/">Home</a></p>
Expand Down
10 changes: 10 additions & 0 deletions html/packet-loss.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ <h3>Decrease Packet Rate Using Rate Limiter</h3>
See notes [c] and [d].</p>
</li>
</ol>
<p>When the protocol is operating over a WAN,
you may need to further reduce the rate limiter below the MSMR.
Consider a subscriber that can sustain in input rate of 8 gigabits/sec,
but it is separated from the publisher by a WAN with a total throughput of
10 gigabits/sec.
However, this 10 gigabits/sec must be shared across all networking applications,
and allowing this publisher to peak at 8 gigabits/sec would result in
overload of the WAN link.</p>
<p>To ensure a lossless utilization, you should divide up the available bandwidth
and limit each app that sends over the WAN to its share of the bandwidth.</p>
<p>NOTES:</p>
<p><strong>[a]</strong>: Measuring the maximum sustainable message rate (MSMR) can be difficult if
you don't have a consistent execution environment.
Expand Down
59 changes: 57 additions & 2 deletions kb/configuring-udp-based-transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Elements of configuring LBT-RM and LBT-RU transports.
&nbsp;&nbsp;&nbsp;&nbsp;&bull; [Transmission Window](#transmission-window)
&nbsp;&nbsp;&nbsp;&nbsp;&bull; [Source-Side Filtering (LBT-RU)](#source-side-filtering-lbt-ru)
&nbsp;&nbsp;&nbsp;&nbsp;&bull; [Source Socket Buffer (LBT-RU)](#source-socket-buffer-lbt-ru)
&nbsp;&nbsp;&nbsp;&nbsp;&bull; [DRO Peer Link](#dro-peer-link)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&bull; [Special Peer Link Considerations](#special-peer-link-considerations)
<!-- TOC created by './mdtoc.pl kb/configuring-udp-based-transports.md' (see https://github.com/fordsfords/mdtoc) -->
<!-- mdtoc-end -->

Expand Down Expand Up @@ -113,7 +115,10 @@ and
according to the procedure listed in
[Decrease Packet Rate Using Rate Limiter](https://ultramessaging.github.io/um_kb/html/packet-loss.html#decrease-packet-rate-using-rate-limiter).

Note that
Note that the default value for the data rate limiter is 10 megabits/sec,
which is almost certainly too low for most real-world use cases.

Also note that
[Smart Sources](https://ultramessaging.github.io/currdoc/doc/Design/advancedoptimizations.html#smartsources)
do not support data rate limits.
To minimize the chances of packet loss and [[NAK storms]],
Expand Down Expand Up @@ -148,7 +153,7 @@ to a minimum of:
(peak_message_rate * avg_message_size) * (initial_nak_backoff + 3*nak_backoff + 2*max_round_trip)
```
For example, a peak message rate of 80,000 msgs/sec, average message size of 600 bytes,
initial NAK backoff of .09 sec, nak_backoff of .2 sec, round trip time of 0 (assume no WAN):
initial NAK backoff of .09 sec, nak_backoff of .2 sec, round-trip time of 0 (assume no WAN):
```
(80,000 * 600) * (.09 + .6) = 33,120,000
```
Expand All @@ -169,3 +174,53 @@ For example, if you expect 8 subscribers to join the source,
```
1000000 + 100000 * 8 = 1800000
```

## DRO Peer Link

The
[UM Dynamic Routing Option (DRO)](https://ultramessaging.github.io/currdoc/doc/Design/fundamentalconcepts.html#umrouter)
can be configured for a
[UDP Peer Link](https://ultramessaging.github.io/currdoc/doc/Gateway/droarchitecture.html#udppeerlink).
This peer link uses the same underlying protocols and code base as the LBT-RU transport type.
However, because it is not associated with regular UM sources and receivers,
it must be configured using the DRO's XML configuration file,
and the configuration options are somewhat different.

The [Router Element "<udp>"](https://ultramessaging.github.io/currdoc/doc/Gateway/xmlconfigurationreference.html#droelementudp)
element has children elements that specify the LBT-RU operating parameters.

For example,
[Router Element "<peer-rate-limit>"](https://ultramessaging.github.io/currdoc/doc/Gateway/xmlconfigurationreference.html#droelementpeerratelimit)
has attributes that control the rate limiter. For example:
```
<portals>
<peer>
...
<udp>
...
<peer-rate-limit data="10000000" retransmit="5000000" interval="100"/>
</udp>
</peer>
...
</portals>
```
This is the equivalent of:
```
context transport_lbtru_data_rate_limit 10000000
context transport_lbtru_retransmit_rate_limit 5000000
context transport_lbtru_rate_interval 100
```

### Special Peer Link Considerations

When configuring a UDP peer link for a pair of DROs,
all the same considerations must be made as are discussed in this article.
However, pay special attention to the items that include network round-trip time,
such as NAK backoff times and transmission window.
For DROs that are widely separated, larger values for both are generally advised.

Also, to ensure a lossless utilization, you should divide up the available bandwidth
and limit each app that sends over the WAN to its share of the bandwidth using
UM's rate limiter.
See
[Decrease Packet Rate Using Rate Limiter](https://ultramessaging.github.io/um_kb/html/packet-loss.html#decrease-packet-rate-using-rate-limiter).
12 changes: 12 additions & 0 deletions kb/packet-loss.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ while a smaller value forces smoother, less-bursty traffic
(at the expense of potentially blocking the sender).
See notes [c] and [d].

When the protocol is operating over a WAN,
you may need to further reduce the rate limiter below the MSMR.
Consider a subscriber that can sustain in input rate of 8 gigabits/sec,
but it is separated from the publisher by a WAN with a total throughput of
10 gigabits/sec.
However, this 10 gigabits/sec must be shared across all networking applications,
and allowing this publisher to peak at 8 gigabits/sec would result in
overload of the WAN link.

To ensure a lossless utilization, you should divide up the available bandwidth
and limit each app that sends over the WAN to its share of the bandwidth.

NOTES:

**[a]**: Measuring the maximum sustainable message rate (MSMR) can be difficult if
Expand Down

0 comments on commit 07617a6

Please sign in to comment.