Weblogic的Apache的插件和会话粘性 [英] Weblogic Apache plugin and session stickiness

查看:285
本文介绍了Weblogic的Apache的插件和会话粘性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果两个Web服务器负载平衡器和WebLogic集群之间的配置,将两个Apache服务器维护会话粘性?

If two web servers are configured in between a load balancer and a weblogic cluster, will the two Apache server maintain session stickiness?

说,例如,负载均衡器转发的第一个请求到第1 Apache和反过来第一阿帕奇转发到第1 WL管理的实例。即使从同一用户在第二REQ由负载平衡器转发到第二apache的,将所述第二阿帕奇能够将其转发给第一WLManaged实例其中担任第一个请求而不是第二WLManaged实例这是不知道会话信息都没有。

Say for example, the load balancer forwards the first request to the 1st apache and in turn 1st apache forwards to 1st WL managed instance. Even if the second req from the same user is forwarded by the load balancer to the second apache, will the second apache be able to forward it to the 1st WLManaged instance which served the first request rather than the second WLManaged instance which is not aware of the session information at all.

什么最好应在WebLogic的Apache插件的行为?美中不足的是,我不希望启用WL服务器群集上的会话复制。

What should ideally be the behaviour of the weblogic apache plugin? The catch is I don't want to enable session replication on the wl server cluster.

推荐答案

据一节<一个href=\"http://download.oracle.com/docs/cd/E13222%5F01/wls/docs100/plugins/apache.html#wp113659\">Failover, Cookie和HTTP会话Apache HTTP服务器插件:

According to the section "Failover, Cookies, and HTTP Sessions" of the Apache HTTP Server Plug-In:

当一个请求包含存储在Cookie或POST数据会话信息,或者带一个URL codeD,会话ID包含在最初建立会话的特定服务器实例的引用(称为主服务器)和其他服务器的引用原始会话复制(称为次级服务器)。包含Cookie的请求会尝试连接到主服务器。如果尝试失败,将请求路由到辅助服务器。如果主服务器和备用服务器失败,会话丢失,插件试图使在动态集群名单新鲜连接到另一台服务器。见<一href=\"http://download.oracle.com/docs/cd/E13222%5F01/wls/docs100/plugins/apache.html#wp116061\">Figure 3-1连接故障转移。

When a request contains session information stored in a cookie or in the POST data, or encoded in a URL, the session ID contains a reference to the specific server instance in which the session was originally established (called the primary server) and a reference to an additional server where the original session is replicated (called the secondary server). A request containing a cookie attempts to connect to the primary server. If that attempt fails, the request is routed to the secondary server. If both the primary and secondary servers fail, the session is lost and the plug-in attempts to make a fresh connection to another server in the dynamic cluster list. See Figure 3-1 Connection Failover.

注意:如果POST数据大于64K,插件将不会解析POST数据以获取会话ID。因此,如果您的会话ID存储在POST数据中,插件无法将请求路由到正确的一级或二级服务器,从而导致会话数据丢失。

Note: If the POST data is larger than 64K, the plug-in will not parse the POST data to obtain the session ID. Therefore, if you store the session ID in the POST data, the plug-in cannot route the request to the correct primary or secondary server, resulting in possible loss of session data.

图3-1连接故障转移

在换句话说,后,双方的Apache服务器,将能够传入的请求转发到右的WebLogic实例作为会话ID包含所有的必要信息。请注意,有没有真正的需要与测试,以确认这一点,但它会很容易,但。

In other words, yes, both Apache servers will be able to forward an incoming request to the "right" WebLogic instance as the session ID contains all the required information for that. Note that there is no real need to confirm this with testing but it would very easy though.

更新:从OP回答以下注释

我觉得这个文件代表良好的只有一个Apache服务器。就我而言,我有两个和负载平衡器转发50:50的方式要求两个服务器。我没有测试这和WebLogic插件未保持黏性。

I think this document stands good for only one apache server. In my case I have two and the load balancer forwards the requests to both the servers in a 50:50 manner. I did test this and the weblogic plugin is not maintaining the stickiness.

我明白你正在使用两个Apache fontend,我不知道这个文件适用只有一个Apache服务器来配置。如前所述,会话ID包含主服务器的引用(和辅助服务器以及),因此两者的Apache应该能够对付它。至少,这是我的理解。其实,我已经在过去的类似配置的工作,但我觉得他们应该或者不记得,如果事情工作,如果负载平衡器配置为处理粘性太(即着一个给定的Apache服务器)。我现在有一点疑问...

I understood you are using two apache fontend and I'm not sure this document applies to configuration with one apache server only. As explained, the session ID contains a reference of the primary server (and the secondary server as well) so both apache should be able to deal with it. At least, this is my understanding. Actually, I've worked with a similar configuration in the past but can't remember if things were working as I think they should or if the load balancer was configured to handle stickiness too (i.e. forward to a given Apache server). I have a little doubt now...

可以发布你的插件配置(包括Apache服务器,如果他们不同)?你能否确认还预期,事情正在当只有一个Apache服务器达(以及带阿帕奇测试这个,如果他们的配置不同,这不应该是,虽然这种情况)?

Could post your plugin configuration (of both apache server if they differ)? Could you also confirm that things are working as expected when only one apache server is up (and test this with both apache if their configuration differ, which shouldn't be the case though)?

这篇关于Weblogic的Apache的插件和会话粘性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆