Search code examples
pythonmysqlredispush-notificationpushwoosh

What is the best to use as queue: Redis, Mysql , Python list


I generate lot of messages for sending to client (push notifications using push woosh). I collect messages for a period of time and the send a bucket of messages. Need advice, what is the best to use for queue python list ( I am afraid to store in memory lot of messages and to lose if server restarts), Redis or MySQL ?


Solution

  • Redis can save the data contained in memory on your hard drive, so you don't have to be worried about to lose informations. And you can add a key expiration to your data saved in memory, so you can remove old messages.

    Have a look here :

    http://redis.io/topics/persistence

    And here :

    http://redis.io/commands/expire