Reputation: 655
I am newbie to the Ejabberd so I am still exploring all the possibilities and possible setups for chat server.
From the documentation I have seen that Ejabberd supports Redis database for transient data, user session I suppose...
I was wondering has anyone had any experience using Redis for storing transient data and then MySql for the rest of the data? Will this setup be beneficial comparing to Mnesia + MySql one? Maybe Redis + Riak is even better setup?
Just looking for some general opinions since I am a newcomer in this area...
Upvotes: 2
Views: 1102
Reputation: 3110
Full disclosure: I work for Basho, the maintainers of Riak, so I have a clear preference here.
Looking at the source of Ejabberd, I see it's written in Erlang as well, which is optimized as a distributed system. Their architecture diagram specifically shows Riak as a NoSQL backend. Redis is often paired with Riak due to its simple retrieval and key/value design. If scale is a concern on the transient side as well, you could use Riak's in-memory backend alongside the disk-based backend for durable data (more on backends here).
Riak is designed for scaling, so if you anticipate growth beyond a single server's worth of CPU, memory or storage, then it's perfect. If you do not anticipate this growth, then Riak may be overkill. For more on when to use it, read this.
Upvotes: 3