1

我正在使用 appsession 配置元素进行粘性会话。我有 5 个 weblogic 实例,其中 3 个处于活动状态,现在在负载增加时提供负载,我启动了另外 2 个实例。现在 HAProxy 将它们标记为“Helthy”,但不会向其传输任何流量,因为它具有粘性。

如何将现有会话转移到新的 weblogic 服务器。我正在使用 Terracotta 进行会话集群,因此哪个服务器为请求提供服务并不重要。下面是我对 HAProxy 的配置。

# this config needs haproxy-1.1.28 or haproxy-1.2.1

global
      log 127.0.0.1   local0
      maxconn 1024
      daemon
     # debug
      #quiet

defaults
      log     global
      mode    http
      option  httplog
      option  httpchk
      option  httpclose
      retries 3
      option redispatch
      contimeout      5000
      clitimeout      50000
      srvtimeout      50000
      stats uri /admin?stats
      stats refresh 5s

listen  terracotta 0.0.0.0:10001
#     balance url_param JSESSIONID
      balance roundrobin
      option httpchk OPTIONS /Townsend
      server  L1_1 10.211.55.1:7003  check
      server  L1_2 10.211.55.2:7004  check
   server  L1_3 10.211.55.3:7004  check
      appsession JSESSIONID len 52 timeout 3h
4

1 回答 1

5

然后,如果哪个服务器为请求提供服务无关紧要,请禁用粘性并删除 appsession 行。您必须了解粘性与负载平衡相反。如果您的问题是您无法扩展,请不要先坚持。

于 2009-09-26T06:16:45.657 回答