I have an ASP.NET Web application which utilizes Redis (via the totally awesome StackExchange.Redis) as a cache store.
I am also using Redis pub/sub to invalidate these cache entries when they needed to be refreshed (read: cache long, refresh as needed). However, i have been noticing that if the publishers wrote too fast, the web application (subscriber) could not keep up with the messages and the socket connection to Redis would become blocked causing no reads to complete (note: this may not be the reason for the socket being blocked, but I drew this conclusion after removing pub/sub from my web application, and the problem dissipated)
Side note: i have left the PreserveAsyncOrder option to it's default (true), but i'm thinking i could make this false since i don't care about the order of the messages?
To give you an idea of how this all works, on startup (only once) the web app:
Then, background components publish messages to Redis (say at most 1 or 2 a second), which causes the web app to update (not delete) the cached entry, for example adding an item to a pre-existing set.
Any guidance would be much appreciated.