How to configure RabbitMQ to store only in-memory

792 views
Skip to first unread message

Elad Levy

unread,
Feb 2, 2017, 2:00:16 PM2/2/17
to rabbitmq-users
Hi,
Is it possible?

I found this configuration property:
vm_memory_high_watermark

If I will set it to 1, will it disable the writing to the hard disc?

Thanks in advance,
Elad

Michael Klishin

unread,
Feb 2, 2017, 2:11:41 PM2/2/17
to rabbitm...@googlegroups.com, Elad Levy
No, it won't. That setting is explained in the docs:

http://www.rabbitmq.com/memory.html
http://www.rabbitmq.com/alarms.html

Even transient messages can be moved to disk when a node is under memory pressure.
You can delay it but not disable it entirely and you don't want to disable it anyway,
because then if you have consumers go down or lose connection your entire system will
stall.

You can also configure RabbitMQ to use a directory on an in-memory volume
as its data directory. That's also a questionable idea: as soon as your machine
is rebooted, that entire node will have to start from scratch and sync everything from others.
Depending on how RabbitMQ is provisioned and your workload this may or may not
be a problem but I'm not sure what the upside is.

RabbitMQ nodes also can run as "RAM nodes" and we say that 98% of users don't need them.
RAM nodes do not store everything in RAM, only internal database tables. They also need a disk node
in order to join a cluster, which creates limitations for deployment scenarios.
The only workload we've seen that justifies RAM nodes is a really high queue and binding churn.

If you are looking for an in-memory only system that can do basic messaging
(or something that looks like messaging at first), there are Redis, Gemfire and more
tools that may be more suitable.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages