If Redis starts to lag*, it will cause many of your connections to get
killed (but not necessarily cause the connections to be closed
immediately). Those killed connections will result in connections not
being recycled, but being created (as expected). Connection creation
is 1 1/2 round-trips for TCP, after which your app can send the data.
Those connection attempts will increase the likelihood of timing out
on all requests. This will cause snowballing to the result that you
are experiencing.
* Lag can be caused by the Linux scheduler deciding that another
process should get time, maybe that the process should be on a
different core, can be caused by a slave reconnecting (causing a fork,
and temporary delay), the network being saturated with slave sync
traffic, any one of a number of network hiccups (which can be caused
by solar flares), etc.
There are two simple solutions to this problem.
1. Increase your after-request write timeouts from .09 milliseconds to
1 millisecond (or even 10 milliseconds) to reduce the chances of
momentary lag running away on you
2. Defer your writes to a task processor, and effectively remove
timeouts, but measure the latency for reporting/alert purposes
Regards,
- Josiah
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to
redi...@googlegroups.com.
> To unsubscribe from this group, send email to
redis-db+u...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/redis-db?hl=en.
>