0
votes

I am building a notification model with Redis as database. With every addition to a particular key in the database, I notify the remote client(written with Redis-py) using Redis's pubsub feature and also a HTTP based notification.

While running performance test and comparing the times between Redis PUBSUB notification and HTTP Response are fairly close( redis still being faster than HTTP by a few ms. Example. Redis notification takes 47 ms and HTTP notification takes 56 ms).

I was assuming Redis PUBSUB would be much faster than HTTP. Is this the expected performance of redis notification over HTTP ? Is there a faster way to push notifications from Redis db (faster than HTTP)?

1
Adding to my question, Are there any notification models that I can build with python which will be faster than redis pubsub?Sakti Aishwarya Arunachalam

1 Answers

0
votes

What is your ping to client instance? If underlying network is slow, there is nothing much you can do. Only switch to UDP custom protocol. Because expected performance of Redis PUBSUB is about 4k op/s with regular hardware. Also what is the message size you are transferring? If it is high, you're also bound to your network speed.