You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by Jan Li <ja...@airwallex.com> on 2020/11/16 07:50:30 UTC

Proposal: support redis circuit breaker

Hi community,

      Currently APISIX uses Redis to do cluster-level rate limit, it calls
Redis for every request to check whether the rate control is broken.

      Problem is that Redis becomes an important dependency in the critical
path of request processing. So if Redis is under maintenance, every request
will have to wait for the Redis connection to timeout. The timeout will
slow down request processing of APISIX and might cause other issues due to
request processing are actually pending.

      Proposal:

   1. Start a backend process to check the availability of Redis.
   2. If Redis is unavailable, all operations on Redis will fail fast.
   3. If Redis is back to normal, all operations on Redis will hit Redis
   again.
   4. The check health interval can be configured in config.yaml.

Re: Proposal: support redis circuit breaker

Posted by YuanSheng Wang <me...@apache.org>.
This is a very good feature and we need it.

The nice proposal, thx Jan Li.


On Mon, Nov 16, 2020 at 4:40 PM Ming Wen <we...@apache.org> wrote:

> agreed.
> We need a health check for redis, just like upstream health check.
>
> Thanks,
> Ming Wen, Apache APISIX PMC Chair
> Twitter: _WenMing
>
>
> Jan Li <ja...@airwallex.com> 于2020年11月16日周一 下午3:50写道:
>
> > Hi community,
> >
> >       Currently APISIX uses Redis to do cluster-level rate limit, it
> calls
> > Redis for every request to check whether the rate control is broken.
> >
> >       Problem is that Redis becomes an important dependency in the
> critical
> > path of request processing. So if Redis is under maintenance, every
> request
> > will have to wait for the Redis connection to timeout. The timeout will
> > slow down request processing of APISIX and might cause other issues due
> to
> > request processing are actually pending.
> >
> >       Proposal:
> >
> >    1. Start a backend process to check the availability of Redis.
> >    2. If Redis is unavailable, all operations on Redis will fail fast.
> >    3. If Redis is back to normal, all operations on Redis will hit Redis
> >    again.
> >    4. The check health interval can be configured in config.yaml.
> >
>


-- 

*MembPhis*
My GitHub: https://github.com/membphis
Apache APISIX: https://github.com/apache/apisix

Re: Proposal: support redis circuit breaker

Posted by Ming Wen <we...@apache.org>.
agreed.
We need a health check for redis, just like upstream health check.

Thanks,
Ming Wen, Apache APISIX PMC Chair
Twitter: _WenMing


Jan Li <ja...@airwallex.com> 于2020年11月16日周一 下午3:50写道:

> Hi community,
>
>       Currently APISIX uses Redis to do cluster-level rate limit, it calls
> Redis for every request to check whether the rate control is broken.
>
>       Problem is that Redis becomes an important dependency in the critical
> path of request processing. So if Redis is under maintenance, every request
> will have to wait for the Redis connection to timeout. The timeout will
> slow down request processing of APISIX and might cause other issues due to
> request processing are actually pending.
>
>       Proposal:
>
>    1. Start a backend process to check the availability of Redis.
>    2. If Redis is unavailable, all operations on Redis will fail fast.
>    3. If Redis is back to normal, all operations on Redis will hit Redis
>    again.
>    4. The check health interval can be configured in config.yaml.
>