CentOS 上 WebLogic 集群的负载均衡方案

一 架构选型与算法
二 方案一 WebLogic Proxy Plug-in 配置示例(Apache httpd)
LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.soListen 9088<IfModule mod_weblogic.c>WebLogicCluster 192.168.3.37:8000,192.168.3.37:8001MatchExpression *.*WLTempDir "/usr/local/httpd/reqtmp"DebugConfigInfo ONKeepAliveEnabled ONKeepAliveSecs 15</IfModule>Include conf/weblogic.conf重启 Apache 后通过 http://:9088/ 访问,插件将以轮询方式分发请求并在故障节点间实现会话故障转移。三 方案二 外部负载均衡器配置示例(Nginx/HAProxy)
http {upstream weblogic_cluster {server 192.168.1.101:7001;server 192.168.1.102:7001;}server {listen 80;server_name example.com;location / {proxy_pass http://weblogic_cluster;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;}}}globallog /dev/log local0log /dev/log local1 noticemaxconn 4096defaultslog globalmode httpoption httplogretries 3timeout connect 10stimeout client1mtimeout server1mfrontend http-inbind *:80default_backend weblogic_serversbackend weblogic_serversbalance roundrobinserver s1 192.168.1.101:7001 checkserver s2 192.168.1.102:7001 check四 验证与运维要点