If you don't set a maxmemory limit the allkeys-lru policy then isn't really going to be used as it will never need to evict any keys.
Here is what happens to Redis when it runs out of memory (https://redis.io/topics/faq):
Here is what happens to Redis when it runs out of memory (https://redis.io/topics/faq):
Redis will either be killed by the Linux kernel OOM killer,
crash with an error, or will start to slow down.
With modern operating systems malloc() returning NULL is not common, usually
the server will start swapping (if some swap space is configured), and Redis
performance will start to degrade, so you'll probably notice there is something
wrong.
Maxmemory sets the limit of how much RAM/memory Redis can use. If you have a 4GB system, something like 3GB may be a good value (but large for moodle for example).
Once it gets close to 3GB of data in Redis, it will then choose what to do by the maxmemory policy. Allkeys-lru will try to remove the least recently used key to make room for the newer keys.
If using a single redis instance with different prefixes for muc and sessions, it should be ok, but keep an eye on it when it's getting large to make sure it's not running into any issues.