IBMStreams / streamsx.dps

The IBMStreams/streamsx.dps GitHub repository is home to the Streams toolkit named DPS (Distributed Process Store)
http://ibmstreams.github.io/streamsx.dps
Other
4 stars 9 forks source link

Failures when Redis servers timeout client connections #37

Closed Alex-Cook4 closed 4 years ago

Alex-Cook4 commented 7 years ago

By default, the latest versions of Redis do not timeout client connections, however, if a timeout t is set on the server, then a PE that reads/writes to Redis will get disconnected if there are no tuples for t seconds.

This is a problem in environments where whomever is managing a Streams application doesn't have control over the Redis setup.

Am I right in that a workaround would be to:

  1. Run the redis set.
  2. Check the error code to see that the connection was lost.
  3. Try to reconnect based on the error code.

I believe we should automatically try to reconnect in the event of a connection failure like this. Operators in the messaging toolkit could potentially serve as an example for reconnection policies.