多级缓存-OpenResty tomcat集群负载均衡

#user  nobody;
worker_processes  1;
error_log  logs/error.log;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    #nginx的业务集群,nginx本地缓存、redis缓存、tomcat查询
    upstream nginx-cluster{
        hash $request_uri;
        server 192.168.8.118:8081;
        server 192.168.8.118:8082;
    }

    server {
        listen       80;
        server_name  localhost;

        location /item {
            proxy_pass http://nginx-cluster;
        }

        location / {
            root   html;
            index  index.html index.htm;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

Original: https://www.cnblogs.com/linjiqin/p/15434987.html
Author: Ruthless
Title: 多级缓存-OpenResty tomcat集群负载均衡

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/547247/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球