安装memcached服务,并启动添加数据 yum -y install memcached systemctl start memcached.service 启动 [root@python ~]# telnet 127.0.0.1 11211 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. set hello 0 0 5 world STORED get hello VALUE hello 0 5 w
需要nginx作为websocket的反向代理,没有nginx反向代理时候没有问题,通过nginx反向代理后会报400错误,查后台调试信息: tornado.general – DEBUG – Can “Upgrade” only to “WebSocket”. 通过分析原来是需要nginx做如下配置: upstream wsbackend { server 127.0.0.1:10003; } server { listen 3000; server_name localhost; #char