rinetd代理阿里云redis导致服务器cpu满载

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32642039/article/details/82120745

一、应用场景场景

阿里云官方文档中的redis公网访问方案使用了rinetd作为代理工具,这个工具并不适合公司场景。一旦访问人数过多就会服务不可用,在这一点上我觉得阿里云没有测试方案的稳定性就给用户使用。

二、部署方案

通过nginx的stream模块,代理阿里云redis和阿里云memcache。

参考教程:https://help.aliyun.com/document_detail/47896.html

三、遇到的问题

1.nginx在代理redis的时候,nginx不能监听6379,否则无法转发,原因还不知道。
只需要在nginx配置端口6380转发到redis的内网ip:6379
2.nginx代理后出现大量time_wait
因为启动大量redis连接,导致ngixn日志报错connections is not enough
处理方法:max_connections从1024调整至4096,问题解决。

猜你喜欢

转载自blog.csdn.net/qq_32642039/article/details/82120745