[rabbitmq-discuss] Active/active HA setup

Alexis Richardson alexis at rabbitmq.com
Thu Sep 2 23:50:18 BST 2010


Jiri

You say that "Some clients send requests to one broker, some to the other".


Does this mean that one client publisher can send messages (requests) to
both brokers, in such a way that a pair of messages may arrive out of order
if one is sent to each broker?

If the answer is no, then I think my answer stands, because causal order
will be preserved even if messages are lost.  That is: messages that arrive
successfully, will not be out of order with each other.

If the answer is yes, then I am not sure how you can recover global ordering
without imposing it at the publisher using sequence numbers at the app
level.

Does this make sense?

alexis



On Thu, Sep 2, 2010 at 9:46 PM, Jiri Krutil <jiri at krutil.com> wrote:

> Alexis
>
> Sorry I probably didn't express myself well.
>
> We don't plan a primary and secondary broker, but a pair of brokers that
> are both active at the same time. A load balancer divides client connections
> to these brokers. A request queue with the same name exists on both brokers,
> but with different contents. Some clients send requests to one broker, some
> to the other. Our back-end server listens to both queues, processes requests
> and sends each response to an exclusive client queue on the broker from
> where the request came.
>
> Ideally this would be transparent to the clients, because the brokers would
> be hidden by a virtual IP address. Of course it can't be transparent to the
> back-end server, which needs to talk to both brokers at the same time.
>
> So (a) is correct, but (b) not.
>
> Hope that makes it a bit clearer...
>
> Cheers
> Jiri
>
>
>
>  Jiri
>>
>> That answered my questions.  Now, as I understood your example:
>>
>> a. you don't mind messages being lost
>> *and*
>> b. you don't use the secondary until after the primary has failed.
>>
>> Note that if consumption is completely 'fire and forget' then it is
>> possible that a message from the primary may *arrive* after a message from
>> the secondary.  But this can happen whether you use sequence numbers or not.
>>
>> So if the primary broker fails, why not just forget all undelivered
>> messages?  Consumers will know that any message consumed from the secondary
>> must be later in *all* orderings than any message consumed from the primary.
>>  So, additional sequence numbering is not necessary.
>>
>> alexis
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100902/80c076e0/attachment-0001.htm>


More information about the rabbitmq-discuss mailing list