Nginx反向代理WebSocket

Nginx反向代理WebSocket WebSocket 是 HTML5 开始提供的一种在单个 TCP 连接上进行全双工通讯的协议。该协议使得客户端和服务器之间的数据交换变得更加简

Python操作Redis

Python操作Redis redis-py install 1 pip install redis Start a redis via docker: 1 docker run -p 6379:6379 -it redis/redis-stack:latest Quickly connecting to redis 1 2 3 4 5 import redis r = redis.Redis(host='localhost', port=6379, db=0) r.ping() r.set('foo', 'bar') r.get('foo') Connection Pools 1 2 3 4 import redis pool = redis.ConnectionPool(host='localhost', port=6379, db=0) r = redis.Redis(connection_pool=pool) r.ping() 操作