Skip to content

Commit

Permalink
documenting algorithmic change to exchangeSplit
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Dec 6, 2024
1 parent 31638ee commit cf36775
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/source/Explanation/CommandLineGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,7 @@ post_exchangeSplit <number> (default: 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The **post_exchangeSplit** option appends a two digit suffix resulting from
hashing the last character of the checksum to the post_exchange name,
hashing the path to the post_exchange name,
in order to divide the output amongst a number of exchanges. This is currently used
in high traffic pumps to allow multiple instances of winnow, which cannot be
instanced in the normal way. Example::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/How2Guides/Admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ winnow is used to suppress duplicates.
first time a posting is received, it could be picked by one instance, and if a duplicate one is received
it would likely be picked up by another instance. **For effective duplicate suppression with instances**,
one must **deploy two layers of subscribers**. Use a **first layer of subscribers (shovels)** with duplicate
suppression turned off and output with *post_exchangeSplit*, which route posts by checksum to
suppression turned off and output with *post_exchangeSplit*, which route posts by path to
a **second layer of subscribers (sr_winnow) whose duplicate suppression caches are active.**


Expand Down
4 changes: 2 additions & 2 deletions docs/source/How2Guides/FlowCallbacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,12 @@ Customizing post_exchangeSplit

The exchangeSplit function allows a single flow to send outputs to different exchanges,
numbered 1...n to provide load distribution. The built-in processing does this in a
fixed way based on the hash of the identify field. The purpose of exchangeSplit is to
fixed way based on the hash of the relPath field. The purpose of exchangeSplit is to
allow a common set of downstream paths to receive a subset of the total flow, and for
products with similar "routing" to land on the same downstream node. For example, a file
with a given checksum, for winnowing to work, has to land on the same downstream node.

It could be that, rather than using a checksum, one would prefer to use some other
It could be that, rather than using the path, one would prefer to use some other
method to decide which exchange is used::

import logging
Expand Down
20 changes: 14 additions & 6 deletions docs/source/Reference/sr3_options.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ picked by one instance, and if a duplicate one is received it would likely
be picked up by another instance. **For effective duplicate suppression with instances**,
one must **deploy two layers of subscribers**. Use
a **first layer of subscribers (shovels)** with duplicate suppression turned
off and output with *post_exchangeSplit*, which route notification with the same checksum to
off and output with *post_exchangeSplit*, which route notification with the same path to
the same member of a **second layer of subscribers (winnow) whose duplicate suppression caches
are active.**

Expand Down Expand Up @@ -1453,11 +1453,18 @@ to modify messages generated about files prior to posting.
post_exchangeSplit <count> (default: 0)
---------------------------------------

The **post_exchangeSplit** option appends a two digit suffix resulting from
hashing the last character of the checksum to the post_exchange name,
in order to divide the output amongst a number of exchanges. This is currently used
in high traffic pumps to allow multiple instances of winnow, which cannot be
instanced in the normal way. Example::
The **post_exchangeSplit** option appends a two digit suffix to the post_exchange name,
in order to divide the output amongst a number of exchanges.

Each message is posted to one of the exchanges based on an index
derived from the message, intended to be the same for a given path.
The hash is calculated as the sum of the characters in *relPath* field
or, if missing, *retrievePath*, or if missing 0) modulo the number of
exchanges.

This is currently used in high traffic pumps to allow multiple
instances of winnow, which cannot be instanced in the normal way.
Example::

post_exchangeSplit 5
post_exchange xwinnow
Expand All @@ -1466,6 +1473,7 @@ will result in posting messages to five exchanges named: xwinnow00, xwinnow01,
xwinnow02, xwinnow03 and xwinnow04, where each exchange will receive only one fifth
of the total flow.


post_format <name> (default: v03)
---------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/source/fr/CommentFaire/FlowCallbacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Personnalisation de post_exchangeSplit

La fonction ExchangeSplit permet à un seul flux d'envoyer des sorties à différents échanges,
numérotés 1...n pour assurer la répartition de la charge. Le traitement intégré le fait de manière
manière fixe basée sur le hachage du champ d'identification. Le but d'exchangeSplit est de
manière fixe basée sur le hachage du champs *relPath*. Le but d'exchangeSplit est de
permettre à un ensemble commun de chemins en aval de recevoir un sous-ensemble du flux total, et pour
les produits avec un « routage » similaire atterrissent sur le même nœud en aval. Par exemple, un fichier
avec une somme de contrôle donnée, pour que le vannage fonctionne, il doit atterrir sur le même nœud en aval.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/fr/Explication/GuideLigneDeCommande.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2230,8 +2230,8 @@ une telle configuration.
post_exchangeSplit <number> (défaut: 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

L'option **post_exchangeSplit** ajoute un suffixe à deux chiffres résultant d'une
division entière du dernier digit de la somme de contrôle, afin de répartir les
L'option **post_exchangeSplit** ajoute un suffixe à deux chiffres résultant de
hacher le chemin (relPath), afin de répartir les
avis entre un certain nombre d'échanges, selon la valeur de leur somme de contrôle.
C'est utilisé dans les pompes à trafic élevé pour permettre des instances
multiples de winnow, ce qui ne peut pas être instancié de la manière normale. exemple::
Expand Down
13 changes: 10 additions & 3 deletions docs/source/fr/Reference/sr3_options.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ une fil d’attente, la première fois qu’une publication est reçue, elle peu
et si un doublon est ensuite reçu, il sera probablement choisi par une autre instance.
**Pour une suppression efficace des doublons avec les instances**, il faut **déployer deux couches d’abonnés**.
Utiliser une **première couche d’abonnés (shovels)** avec la suppression de doublons éteinte et
utiliser *post_exchangeSplit* pour la sortie. Cela achemine les publications en utilisant la somme de contrôle vers
utiliser *post_exchangeSplit* pour la sortie. Cela achemine les publications du même chemin
une **deuxième couche d’abonnés (winnow) dont les caches de suppression des doublons sont actives.**


Expand Down Expand Up @@ -1448,8 +1448,15 @@ pour modifier les messages d'annonce générés à propos des fichiers avant leu
post_exchangeSplit <compte> (défaut: 0)
---------------------------------------

L’option **post_exchangeSplit** ajoute un suffixe à deux chiffres qui est crée en hachant le dernier caractère
de la somme de contrôle avec le nom de post_exchange, afin de répartir la production entre un certain nombre d’échanges.
L'option **post_exchangeSplit** ajoute un suffixe à deux chiffres au nom post_exchange,
afin de répartir la production entre plusieurs échanges.

Chaque message est publié sur l'un des échanges en fonction d'un index
dérivé du message, destiné à être le même pour un chemin donné.
Le hachage est calculé comme la somme des caractères du champ *relPath*
ou, s'il manque, *retrievePath*, ou s'il manque 0) modulo le nombre de
échanges.

Ceci est actuellement utilisé dans les pompes à trafic élevé pour avoir plusieurs instances de winnow,
qui ne peuvent pas être instancié de la manière normale. Exemple::

Expand Down

0 comments on commit cf36775

Please sign in to comment.