| 14 | | <para>You need to run one <xref linkend="slon"/> instance for each node |
|---|
| 15 | | in a &slony1; cluster, whether you consider that node a |
|---|
| 16 | | <quote>master</quote> or a <quote>slave</quote>. On &windows; when |
|---|
| 17 | | running as a service things are slightly different. One slon service |
|---|
| 18 | | is installed, and a seperate configuration file registered for each |
|---|
| 19 | | node to be serviced by that machine. The main service then manages the |
|---|
| 20 | | individual slons itself. Since a <command>MOVE SET</command> or |
|---|
| 21 | | <command>FAILOVER</command> can switch the roles of nodes, slon needs |
|---|
| 22 | | to be able to function for both providers and subscribers. It is not |
|---|
| 23 | | essential that these daemons run on any particular host, but there are |
|---|
| 24 | | some principles worth considering: |
|---|
| | 14 | <para>Vous devez lancer une instance <xref linkend="slon"/> sur chaque noeud |
|---|
| | 15 | du cluster &slony1; que ce noeud soit considéré comme maître ou esclave. |
|---|
| | 16 | Sous &windows;, l'exécution en tant que service est légÚrement différente. |
|---|
| | 17 | Un service slon est installé, et un fichier de configuration est enregistré |
|---|
| | 18 | pour chaque noeud qui devra être servi par la machine. Le service principal |
|---|
| | 19 | gÚre alors lui-même les slons individuels. Puisque qu'une commande |
|---|
| | 20 | <command>MOVE SET</command> ou <command>FAILOVER</command> peut modifier |
|---|
| | 21 | le rÃŽle des noeuds, slon doit fonctionner pour tous les noeuds. Il n'est |
|---|
| | 22 | pas essentiel que ces démons soient hébergé sur un hÎte particulier, mais |
|---|
| | 23 | quelques principes méritent d'être considérés : |
|---|
| 28 | | <listitem><para> Each <application>slon</application> needs to be able |
|---|
| 29 | | to communicate quickly with the database whose <quote>node |
|---|
| 30 | | controller</quote> it is. Therefore, if a &slony1; cluster runs |
|---|
| 31 | | across some form of Wide Area Network, each slon process should run on |
|---|
| 32 | | or nearby the databases each is controlling. If you break this rule, |
|---|
| 33 | | no particular disaster should ensue, but the added latency introduced |
|---|
| 34 | | to monitoring events on the slon's <quote>own node</quote> will cause |
|---|
| 35 | | it to replicate in a <emphasis>somewhat</emphasis> less timely |
|---|
| 36 | | manner.</para></listitem> |
|---|
| | 27 | <listitem><para> Chaque démon <application>slon</application> doit être capable |
|---|
| | 28 | de communiquer rapidement avec la base de données dont il est le <quote>contrÎleur</quote> |
|---|
| | 29 | Ainsi, si un cluster &slony1; s'étend sur un réseau longue distance (WAN), chaque processus |
|---|
| | 30 | slon doit être exécuté sur ou prÚs de la base de données qu'il gÚre. Si vous |
|---|
| | 31 | enfreignez cette rÚgle, aucun désastre ne s'en suivra mais la latence induite |
|---|
| | 32 | pour surveiller les événements sur son propre noeud, impliquera que le démon |
|---|
| | 33 | slon effectuera une réplication <emphasis>un peu</emphasis> moins rapide. |
|---|
| | 34 | </para></listitem> |
|---|
| 38 | | <listitem><para> The very fastest results would be achieved by having |
|---|
| 39 | | each <application>slon</application> run on the database server that |
|---|
| 40 | | it is servicing. If it runs somewhere within a fast local network, |
|---|
| 41 | | performance will not be noticeably degraded.</para></listitem> |
|---|
| | 36 | <listitem><para> Les meilleurs résultats sont obtenus en exécutant |
|---|
| | 37 | chaque démon <application>slon</application> sur le serveur de |
|---|
| | 38 | base de donnée qu'il contrÎle. Si il est exécuté dans un réseau |
|---|
| | 39 | local rapide, les performances ne seront pas dégradées de maniÚres |
|---|
| | 40 | notables.</para></listitem> |
|---|
| 43 | | <listitem><para> It is an attractive idea to run many of the |
|---|
| 44 | | <application>slon</application> processes for a cluster on one |
|---|
| 45 | | machine, as this makes it easy to monitor them both in terms of log |
|---|
| 46 | | files and process tables from one location. This also eliminates the |
|---|
| 47 | | need to login to several hosts in order to look at log files or to |
|---|
| 48 | | restart <application>slon</application> instances.</para></listitem> |
|---|
| | 42 | <listitem><para> Il est intéressant de lancer plusieurs processus slon |
|---|
| | 43 | sur une machine unique, car il est plus simple de surveiller les |
|---|
| | 44 | fichiers de trace et les tables des processus lorsqu'ils se trouvent |
|---|
| | 45 | au même endroit. Cela évite également de devoir se connecter à |
|---|
| | 46 | plusieurs hÎtes pour lire les fichiers de trace ou pour redémarrer |
|---|
| | 47 | les instances <application>slon</application>.</para></listitem> |
|---|
| 53 | | <warning><para> Do <emphasis>not</emphasis> run a slon that is |
|---|
| 54 | | responsible to service a particular node across a WAN link if at all |
|---|
| 55 | | possible. Any problems with that connection can kill the connection |
|---|
| 56 | | whilst leaving <quote>zombied</quote> database connections on the node |
|---|
| 57 | | that (typically) will not die off for around two hours. This prevents |
|---|
| 58 | | starting up another slon, as described in the <link linkend="FAQ"> FAQ |
|---|
| 59 | | </link> under <link linkend="multipleslonconnections"> multiple slon |
|---|
| 60 | | connections</link>. </para> </warning> |
|---|
| | 52 | <warning><para> <emphasis>Ne lancez pas</emphasis> un démon slon devant |
|---|
| | 53 | gérer un noeud à travers un lien WAN, si possible. |
|---|
| | 54 | Tout problÚme avec ce lien peut tuer les connexions et ainsi laisser |
|---|
| | 55 | des connexions <quote>zombies</quote> sur le noeud qui subsisteront |
|---|
| | 56 | (de maniÚre générale) pendant environ deux heures. Ceci empêche le démarrage |
|---|
| | 57 | d'un autre slon, comme cela est décrit dans la <link linkend="FAQ"> FAQ |
|---|
| | 58 | </link> au sein de la section sur <link linkend="multipleslonconnections">les connexions |
|---|
| | 59 | slon multiples slon</link>. </para> </warning> |
|---|
| 63 | | <para> Historically, <application>slon</application> processes have |
|---|
| 64 | | been fairly fragile, dying if they encounter just about any |
|---|
| 65 | | significant error. This behaviour mandated running some form of |
|---|
| 66 | | <quote>watchdog</quote> which would watch to make sure that if one |
|---|
| 67 | | <application>slon</application> fell over, it would be replaced by |
|---|
| 68 | | another. </para> |
|---|
| | 62 | <para> Historiquement, les processus <application>slon</application> |
|---|
| | 63 | ont été plutÎt fragiles, défaillant dÚs qu'ils rencontraient une |
|---|
| | 64 | erreur significative. Ce comportement impliquait l'utilisation de |
|---|
| | 65 | <quote>chiens de garde</quote> qui surveille les démons afin |
|---|
| | 66 | de s'assurer que si un <application>slon</application> s'arrête, |
|---|
| | 67 | il soit remplacé par un autre. </para> |
|---|
| 82 | | - a somewhat more intelligent version that periodically polls the |
|---|
| 83 | | database, checking to see if a <command>SYNC</command> has taken place |
|---|
| 84 | | recently. We have had VPN connections that occasionally fall over |
|---|
| 85 | | without signalling the application, so that the <xref linkend="slon"/> |
|---|
| 86 | | stops working, but doesn't actually die; this polling addresses that |
|---|
| 87 | | issue.</para></listitem> |
|---|
| | 81 | - une version un peu plus intelligente qui sonde réguliÚrement la |
|---|
| | 82 | base de donnée, pour vérifier qu'un événement <command>SYNC</command> |
|---|
| | 83 | s'est produit récemment. Nous avons connu des connexions VPN qui se |
|---|
| | 84 | terminaient parfois sans avertir l'application, dans ce cas le |
|---|
| | 85 | démon <xref linkend="slon"/> s'arrête mais ne meurt pas; Ce mécanisme |
|---|
| | 86 | de sondage résout ce problÚme.</para></listitem> |
|---|
| 91 | | <para>The <filename>slon_watchdog2</filename> script is probably |
|---|
| 92 | | <emphasis>usually</emphasis> the preferable thing to run. It was at |
|---|
| 93 | | one point not preferable to run it whilst subscribing a very large |
|---|
| 94 | | replication set where it is expected to take many hours to do the |
|---|
| 95 | | <command>COPY SET</command> (the main event that processes a |
|---|
| 96 | | <command>SUBSCRIBE SET</command> request). The problem that came up |
|---|
| 97 | | in that case was that it figured that since it hasn't done a |
|---|
| 98 | | <command>SYNC</command> in 2 hours, something was broken requiring |
|---|
| 99 | | restarting slon, thereby restarting the <command>COPY SET</command> |
|---|
| 100 | | event. More recently, the script has been changed to detect |
|---|
| 101 | | <command>COPY SET</command> in progress.</para> |
|---|
| | 90 | <para>Le script <filename>slon_watchdog2</filename> est |
|---|
| | 91 | <emphasis>en général</emphasis> la solution la plus préférable. |
|---|
| | 92 | Il existe un cas ou elle n'est pas préférable : lorsque l'on |
|---|
| | 93 | abonne un trÚs gros ensemble qui nécessitera plusieurs heures |
|---|
| | 94 | de <command>COPY SET</command> (le principal événement que provoque |
|---|
| | 95 | la requête <command>SUBSCRIBE SET</command>). Le problÚme qui surgit |
|---|
| | 96 | dans ce cas est que le chien de garde constate qu'aucun événement <command>SYNC</command> |
|---|
| | 97 | n'a été produit depuis 2 heures, et déduit que quelque |
|---|
| | 98 | est cassé, ce qui implique un redémarrage du démon slon, ce qui redémarre |
|---|
| | 99 | également le <command>COPY SET</command>. |
|---|
| | 100 | Récemment le script a été modifié pour détecter les <command>COPY SET</command> |
|---|
| | 101 | en cours d'exécution.</para> |
|---|
| 103 | | <para>In &slony1; version 1.2, the structure of the |
|---|
| 104 | | <application>slon</application> has been revised fairly substantially |
|---|
| 105 | | to make it much less fragile. The main process should only die off if |
|---|
| 106 | | you expressly signal it asking it to be killed. </para> |
|---|
| | 103 | <para>Dans &slony1; version 1.2, la structure du démon |
|---|
| | 104 | <application>slon</application> a été révisée de maniÚre importante |
|---|
| | 105 | pour le rendre moins fragile. Le processus principal ne s'arrête que si vous envoyez |
|---|
| | 106 | expressément un signal lui demandant de s'arrêter. </para> |
|---|
| 108 | | <para> A new approach is available in the <xref |
|---|
| 109 | | linkend="launchclusters"/> script which uses |
|---|
| 110 | | <application>slon</application> configuration files and which may be |
|---|
| 111 | | invoked as part of your system startup process.</para> |
|---|
| | 108 | <para> Une nouvelle approche est disponible dans le script <xref |
|---|
| | 109 | linkend="launchclusters"/> qui utilise les fichiers de configuration |
|---|
| | 110 | <application>slon</application> et peut être invoqué comme un service dans |
|---|
| | 111 | le processus de démarrage du systÚme.</para> |
|---|