0

I am using redis to save/update/delete data for my web socket server (Implemented using autobahn - twisted based web socket implementation) according to the messages I get from my server clients. For Redis operations I am using redis-py package. When there is more number of concurrent clients connecting to my server, I could see requests served in synchronous manner. I found redis operations blocks server from handling parallel client requests. Why is this happenimg ? How can I solve this issue ? I am doing redis operations from onMessage function of autobahn protocol class.

Bill Goldberg
  • 1,699
  • 5
  • 26
  • 50

1 Answers1

0

I found the root cause by googling. Issue was the python package I was using for Redis operation (redis-py) was designed in synchronus manner. So twisted server main thread was in blocking state during data fetch/update from Redis. Now I am trying the twisted based asynchronus package for Redis called txredisapi instead of redis-py in twisted way using defer package.

Bill Goldberg
  • 1,699
  • 5
  • 26
  • 50