<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Delayed Replication
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/snacker">Nathan Ciliberto</a> in <i>JBoss Cache</i> - <a href="http://community.jboss.org/message/557584#557584">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>We occasionally see that replication between nodes may take around 500ms at times.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Usually it is "immediate", but occasionally it takes 70ms and we've seen it take up to 500 ms.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The behavior we are expecting is when an EJB request to server 111 is completed, that all of the cache data that was changed is replicated to server 222 before the client EJB request returns.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We have a monitoring application which constantly checks the jboss instances.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So here is the process:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table border="1" cellpadding="3" cellspacing="0" style="border: 1px solid rgb(0, 0, 0); width: 75%;"><tbody><tr><th align="center" style="background-color:#6690BC;" valign="middle"><span style="color: #ffffff;"><strong>step</strong></span><span style="color: #ffffff;"><strong><br/></strong></span></th><th align="center" style="background-color:#6690BC;" valign="middle"><span style="color: #ffffff;"><strong>Server 111<br/></strong></span></th><th align="center" style="background-color:#6690BC;" valign="middle"><span style="color: #ffffff;"><strong>Server 222<br/></strong></span></th></tr><tr><td>1</td><td>monitor invokes ejb to set a NEW cache value for key ABC123.</td><td></td></tr><tr><td>2</td><td>monitor invokes ejb to read the value for key ABC123 and verifies it is the same value it set.</td><td></td></tr><tr><td>3</td><td></td><td><strong style="color: #ff9900; ">monitor invokes ejb to read the value for key ABC123 and verifies it is the same value that was sent to server 111.</strong></td></tr><tr><td>4</td><td></td><td><strong style="color: #ff6600; ">If the value is not the same, try for a max of 5 seconds or until it gets the correct value.</strong></td></tr><tr><td>5</td><td>Monitor invokes ejb to remove key ABC123.</td><td></td></tr><tr><td>6</td><td>Monitor invokes ejb to make sure key ABC123 has been removed.</td><td></td></tr><tr><td>7</td><td></td><td><strong><span style="color: #ff9900;">monitor invokes ejb to make sure key ABC123 has been removed from this server as well.</span><br/></strong></td></tr><tr><td>8</td><td></td><td><strong><span style="color: #ff6600;">if the value still exists, then try for a max of 5 seconds or until it is found that key ABC123 has been removed.</span><br/></strong></td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Most of the time this works correctly.</p><p>However we see delays at steps 3-4 and 7-8 where the value has not been replicated until some time afterwards.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Are there any settings which would guarantee that the cache data has been replicated to the other nodes (barring an error) before the client transaction is completed and control returned to the client?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/557584#557584">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Cache at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>