summaryrefslogtreecommitdiff
path: root/content/xdocs/Reliability Requirements.html
blob: 9cdf0260094b4139b49db71e1ef36f1f48550533 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<html>
    <head>
        <title>Apache Qpid : Reliability Requirements</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            Apache Qpid : Reliability Requirements
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Jun 11, 2007 by <font color="#0050B2">aconway</font>.
				    </div>

				    <h1><a name="ReliabilityRequirements-ReliabilityRequirements"></a>Reliability Requirements</h1>


<h2><a name="ReliabilityRequirements-Failover%28sessionstate%29"></a>Fail-over (session state)</h2>

<p>A cluster member informs its clients of backup candidates for each session. It can update the list periodically.</p>

<p>After an unexpected disconnect the client can connect to one of the candidates and resume its session transparently. All session state is preserved including:</p>
<ul>
	<li>Open references</li>
	<li>Active consumers</li>
	<li>Commands-in-flight</li>
	<li>Open transactions (question: Is there any value in fail-over that aborts TX and/or DTX transactions?)</li>
</ul>


<p>Sessions <em>do not</em> survive</p>
<ul>
	<li>multiple failures that include the current node and all back-up nodes for that session.</li>
	<li>shutdown/restart of the cluster.</li>
</ul>


<h2><a name="ReliabilityRequirements-ClusterRestart%28durableresources%29"></a>Cluster Restart (durable resources)</h2>

<p>The AMQP entities that survive a restart are those defined by AMQP to survive broker restart. AMQP defines <em>durable</em> exchanges and queues and <em>persistent</em> messages. Some further definitions:</p>
<ul>
	<li><em>durable</em> message: persistent messages on a durable queues.</li>
	<li><em>durable</em> enque: act of enqueuing a persistent message on a durable queue.</li>
	<li><em>durable</em> binding: binding between durable exchange and durable queue.</li>
</ul>


<p>The following are preserved if the entire cluster shuts down/crashes and is re-started:</p>
<ul>
	<li><em>Durable</em> wiring: durable exchanges, queues and bindings.</li>
	<li><em>Durable</em> messages</li>
	<li><em>Prepared</em> DTX transactions</li>
</ul>


<p>The following do not survive a restart:</p>
<ul>
	<li>Session state</li>
	<li>Non-durable wiring</li>
	<li>TX transactions are aborted.</li>
	<li>Unprepared DTX transactions are aborted.</li>
	<li>Non-durable effects of prepared DTX transactions are lost.</li>
</ul>


<h3><a name="ReliabilityRequirements-RestartingDTXTransactions"></a>Restarting DTX Transactions</h3>

<p>On restart, prepared DTX transactions may commit or rollback. In either case the outcome is <em>as if</em> the transaction had comitted or rolled back just <em>before</em> the restart: All durable transaction effects survive the restart, all non-durable effects are lost.</p>

<p>In particular</p>
<ul>
	<li>On <b><em>commit</em></b><b>:</b> <em>non durable</em> messages enqueued in the transaction are <em>lost</em>, as if they had been enqueued before the restart and were lost in the restart.</li>
	<li>On <b><em>rollback:</em></b> <em>non durable</em> messages dequeued in the transaction are <em>lost</em>, as if they had been put back on the queue before restart and then lost in the restart.</li>
</ul>


				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td>
		    </tr>
	    </table>
    </body>
</html>