[QAARQ-9] Ensure SyncState is working correctly Created: 26/Nov/15  Updated: 17/Dec/18  Resolved: 29/Jan/16

Status: Closed
Project: Queued Asynchronous Activation over RabbitMQ
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Karel de Witte Assignee: Thanh Pham
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1.5d
Original Estimate: 3d

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

SyncState is a mechanism implemented to guarantee synchronicity of public instances.
It is basically a counter that is incremented on each activation message that is sent, the counter is sent in the message's header. When the public gets the message, he increments his own activation counter. Which means that two publics who have different SyncStates are out of sync, untill they have again the same number. The load balancer is calling the rest service of the public nodes and knows by this way which public node is most up to date, which one is out of sync, for instance if:

  • Rest service is not responding: --> Public Node down --> take it out of teh pool
  • Rest service's sync state is 0: --> Public Node is up but completely out of sync.
  • average(syncstates)-synctate(pubnode)>=x : --> Public node is working but too much under load, take public node temporary out of the pool till average(syncstates)-synctate(pubnode)<x

The loadbalancer also knows when the public instances are getting activated.

SyncStates are persisted to JCR.

Ensure this mechanism is working correctly, i.e there are no exceptions or corner cases that are introduced when:

  • the author restarts
  • one of the public nodes restart
  • when the activation module is installed as a new module on the instance
  • when the activation module is installed as an upgrade of the existing module on the instance.


 Comments   
Comment by Eric Hechinger [ 10/Dec/15 ]

We will need additional information kdewitte in order to proceed.

Comment by Thanh Pham [ 28/Jan/16 ]

SyncState worked correctly with 3 cases:

  • the author restarts
  • one of the public nodes restart
  • when the activation module is installed as an upgrade of the existing module on the instance.
    But with case 3:
  • when the activation module is installed as a new module on the instance
    We need to install magnolia-rabbitmq-activation after activation module
Comment by Thanh Pham [ 29/Jan/16 ]

it worked correctly

Generated at Mon Feb 12 10:38:46 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.