[rabbitmq-discuss] Disable writing to disk

Matthias Reik maze at reik.se
Tue May 14 17:33:36 BST 2013


On 2013-05-14 17:44 , Emile Joubert wrote:
> Hi Matthias,
>
> On 14/05/13 16:23, Matthias Reik wrote:
>> we have been using RabbitMQ for quite a while and are happy users of it,
>> but now we got a new requirement to not write, the messages that are
>> coming through a specific queue, to disk.
>>
>> Does RabbitMQ support such a use case?
> Not at the moment.
>
>> One alternative would of course be to create a RamDisk and write the
>> content to that one, but it was clear from this article
>> http://www.rabbitmq.com/blog/2011/01/20/rabbitmq-backing-stores-databases-and-disks/
>> that this is not a good solution (even though it might be a solution for
>> us).
>
> A RAM-disk will guarantee that messages don't reach secondary storage,
> but I agree this is not a satisfactory solution. It will also affect all
> the queues, while you may need finer control.
We have a RabbitMQ cluster, so we could make sure that the RamDisk would
be set up only on those servers that have those kind of queues.
>
> An alternative option would be to set the vm_memory_high_watermark to a
> very large factor (e.g. 100). The broker will then behave as if it had
> alot more memory than it really has (and therefore it runs the risk of
> crashing with an out-of-memory error). At the moment the broker may
> start sending messages to disk when as little as 5% of RAM is in use.
> Setting the vm_memory_high_watermark high enough that this threshold is
> never reached should avoid disk writes.
Cool. Thanks for the tips/info. For this cases the ZeroMQ approach sounds
quite attractive (at least on paper), that you can assign "swap" size on 
a per
queue level, see http://www.zeromq.org/whitepapers:design-v06
>
> Can you explain why you want to avoid messages in disk? We have been
> asked about this feature before, but the request has never been
> accompanied by a strong motivating argument.
The requirement comes from legal to not infringe Copyright laws (in
different countries). Apparently (and I'm not a legal person, so don't
really ask me any details), it's ok to keep the content in memory, but
not to "store it to disk". It is a bit unknown what the "store to disk"
really means, and therefore I think it's preferred to be on the safe side
and make sure (with reasonable effort) that the message is never
written to disk.
>
>
>
> -Emile
>
>
>
>
>



More information about the rabbitmq-discuss mailing list