Navigation


Changes between Initial Version and Version 1 of TBFailOver


Ignore:
Timestamp:
Jun 21, 2010, 4:35:39 PM (14 years ago)
Author:
Sebastien Decugis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TBFailOver

    v1 v1  
     1[[PageOutline(2-4)]]
     2== Failover testbed ==
     3
     4One of the great improvements of Diameter is the '''failover''' mechanism. This means that after a request has been sent by a Diameter node to another node, if this connection is down before the answer is received, the request is sent through another connection (when possible), so that the message can reach the final destination through a different route. Coupled with the watchdog mechanism of Diameter, this mechanism ensures that all requests receive an answer (which can be an error). The '''failback''' term means that after a connection has been restored, new messages are again sent to this peer.
     5
     6This testbed involves 4 nodes in two different realms: a client ({{{nas}}} in realm {{{a}}}), two relays ({{{proxy}}} in realm {{{a}}}, and {{{proxy}}} in realm {{{b}}}), and a server ({{{serv}}} in realm {{{b}}}). The client and server are using the [wiki:test_app.fdx test_app] application to exchange messages. The routing configuration allows the messages to be conveyed through one of the relays, but not directly between the client and server. In the graph bellow, the blue route is the primary route, and green is secondary in case the primary route is down.
     7
     8{{{
     9#!graphviz
     10graph G {
     11    graph [bgcolor="#E8E8E8C8"];
     12    node [shape=box];
     13    nas [
     14         label="nas.a.rt.testbed.aaa"
     15         URL="#nas.a.rt.testbed.aaa"
     16    ]
     17    proxya [
     18         label="proxy.a.rt.testbed.aaa"
     19         URL="#proxy.a.rt.testbed.aaa"
     20    ]
     21    proxyb [
     22         label="proxy.b.rt.testbed.aaa"
     23         URL="#proxy.b.rt.testbed.aaa"
     24    ]
     25    serv [
     26         label="serv.b.rt.testbed.aaa"
     27         URL="#serv.b.rt.testbed.aaa"
     28    ]
     29    nas -- proxya -- serv [color=green];
     30    nas -- proxyb -- serv [color=blue];
     31    proxya -- proxyb [color=grey];
     32}
     33}}}
     34
     35=== Screencast ===
     36
     37The demonstration is split across two videos, because of its length.
     38It is recommended to watch the video in HD and fullscreen.
     39
     40==== First video: preparation of the testbed. ====
     41[[Embed(youtube=sTlunjatL_w&hd=1,w=660,h=525)]]
     42
     43Here is what happens in this first video:
     44 * (0:00 ~ 0:19) Short explanation of the testbed structure.
     45 * (0:20 ~ 1:19) Start the two relays, check they are connected properly.
     46 * (1:20 ~ 1:49) Add the server, it connects to the two relays.
     47 * (1:50 ~ 2:44) Add the client, also connects to the two relays.
     48 * (2:45 ~ 2:59) Confirm the [wiki:dbg_monitor.fdx] output.
     49 * (3:00 ~ 3:27) Trig the [wiki:test_app.fdx] application.
     50 * (3:28 ~ 4:35) Confirm the basic behavior of Test application (see [wiki:TBSimple Simple Testbed] for detail).
     51
     52==== Second video: Failover experiments. ====
     53[[Embed(youtube=9YyZpB8JHyA&hd=1,w=660,h=525)]]
     54
     55This is the script of the second video:
     56 * (0:08 ~ 1:53) First test: stopping freeDiameter on a relay (notified failover).
     57   * (0:08 ~ 0:21) Explanation and test (stop freeDiameter on {{{proxy.b}}}).
     58   * (0:22 ~ 0:44) Confirm the result is as expected.
     59   * (0:45 ~ 1:10) Start {{{proxy.b}}} again and confirm the failback.
     60   * (1:10 ~ 1:53) Stop {{{proxy.a}}}, no effect, start it again.
     61 * (1:55 ~ 5:45) Second test: simulate a network failure (unnotified failover).
     62   * (1:55 ~ 2:45) Explanation
     63   * (2:46 ~ 2:54) Cut the (virtual) network links for {{{proxy.b}}}
     64   * (2:55 ~ 4:20) Observe and comment the reaction of the testbed.
     65   * (4:21 ~ 4:55) Reconnect the network, observe the REOPEN state and then failback.
     66   * (4:55 ~ 5:45) Confirm the failback by stopping {{{proxy.a}}} then restart it.
     67 * (5:45 ~ 6:56) Stop the server, then the proxy, and check the error code received is consistent.
     68
     69
     70=== Configuration files ===
     71
     72Please note that these files may have been updated since the time the video was created. However, the purpose of the testbed remains the same.
     73
     74==== Scripts ====
     75There is no script demonstrated in this video. Anyway, you might find the scripts from the [wiki:TBSimple Simple Testbed] useful also here.
     76
     77==== nas.a.rt.testbed.aaa ====
     78
     79These are the configuration files for freeDiameter on the client:
     80 [source:VirtualTestbed/conf/nas.a.rt.testbed.aaa/freeDiameter/CMakeFlags CMakeFlags]::
     81   The flags passed to {{{cmake}}} (on the command-line) when preparing the source. The noticeable ones are:
     82    * {{{-DBUILD_TEST_APP:BOOL=ON}}} : compile the [wiki:test_app.fdx] extension.
     83    * {{{-DBUILD_DBG_MONITOR:BOOL=ON}}} : compile the [wiki:dbg_monitor.fdx] extension.
     84    * {{{-DDEFAULT_CONF_PATH:PATH=/root/conf/freeDiameter}}} : Default configuration file path (avoids typing it on the command line).
     85    * Note that the [wiki:rt_default.fdx] extension is also built (by default).
     86
     87 [source:VirtualTestbed/conf/nas.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf freeDiameter.conf]::
     88   The main freeDiameter configuration file. It simply indicates to load the extensions and to connect to the relays (not the server directly).
     89
     90 [source:VirtualTestbed/conf/nas.a.rt.testbed.aaa/freeDiameter/test_app.conf test_app.conf]::
     91   Configuration file for the [wiki:test_app.fdx] extension, indicating the routing AVPs for the Test message (Destination-Host and Destination-Realm).
     92
     93 [source:VirtualTestbed/conf/nas.a.rt.testbed.aaa/freeDiameter/rtd.conf rtd.conf]::
     94   Configuration file for the [wiki:rt_default.fdx] extension. We indicate to the daemon that all messages can be sent to the local relay ({{{proxy.a.rt.testbed.aaa}}}) by default, if no better route is available.
     95
     96==== proxy.a.rt.testbed.aaa ====
     97
     98The following details of the configuration files should be highlighted:
     99
     100 [source:VirtualTestbed/conf/proxy.a.rt.testbed.aaa/freeDiameter/CMakeFlags CMakeFlags]::
     101    * {{{-DBUILD_DBG_RT:BOOL=ON}}} : compile the [wiki:dbg_rt.fdx] extension.
     102    * Note that the [wiki:acl_wl.fdx] extension is also built (by default).
     103    * Note also that the [wiki:test_app.fdx] extension is '''not''' built on the relay: the node does not need to understand fully the message in order to relay it.
     104
     105 [source:VirtualTestbed/conf/proxy.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf freeDiameter.conf]::
     106    * The {{{NoRelay}}} directive is commented out here.
     107    * The only peer to which this relay actively tries to connect is the other peer. It does not initiate connections to the client or server.
     108    * It loads the [wiki:acl_wl.fdx] extension, that enables incoming connections from other peers.
     109
     110 [source:VirtualTestbed/conf/proxy.a.rt.testbed.aaa/freeDiameter/acl_wl.conf acl_wl.conf]::
     111   The configuration file passed to the [wiki:acl_wl.fdx] extension. The meaning here is that any node that claims a Diameter Identity that matches the expression "*.rt.testbed.aaa" is allowed to connect to this peer.
     112
     113==== proxy.b.rt.testbed.aaa ====
     114
     115The configuration files are very similar to the other relay, the same explanation apply.
     116
     117The file [source:VirtualTestbed/conf/proxy.b.rt.testbed.aaa/freeDiameter/CMakeFlags-altlibs CMakeFlags-altlibs] is an informational example on how to link {{{freeDiameter}}} against a non-default GNUTLS library.
     118
     119==== serv.b.rt.testbed.aaa ====
     120
     121The configuration files for the server can be found [source:VirtualTestbed/conf/serv.b.rt.testbed.aaa/freeDiameter/ in this folder]. There is nothing special to add here.
     122
     123----