考虑一种场景。

多台web服务。

1 后台添加用户,更新用户信息,要求管理员能够实时看到变化。

2 前台用户允许1分钟后生效。

 

 

 

 

nginx 配置一致性hash
1. https://github.com/sduwangning/ngx_http_consistent_hash
2. 配置源码信息 cd /path/to/nginx 执行./configure --add-module=/tmp/nginx_upstream_hash-0.3
3. make
4  make install
5  配置nginx.conf
  upstream upload {
        consistent_hash $request_uri; # consistent_hash $remote_addr
        server 10.11.19.15:8087;
        server 10.11.19.15:8080;
  }
6. 测试配置是否正确 nginx -t

7. 使用最新的配置文件./nginx -s reload

相关文章:

  • 2022-12-23
  • 2021-10-30
  • 2021-08-19
  • 2021-08-30
  • 2021-11-26
  • 2021-11-29
  • 2021-10-25
猜你喜欢
  • 2021-06-21
  • 2021-09-24
  • 2021-09-20
  • 2021-07-02
  • 2022-12-23
  • 2021-09-11
相关资源
相似解决方案