高负载的Spring-ws骆驼在并行请求中共享会话

时间:2018-12-12 06:29:21

标签: spring apache-camel spring-ws

我有一个具有两个应用程序的系统:

  • 集成应用程序(骆驼和Spring-ws)
  • 核心应用程序(春季和休眠)

我从J-Meter发起具有10个并行线程的Web服务请求,该线程降落到我的“集成应用程序”,并使用骆驼路由将其重定向到我的“核心应用程序”。

我的整合之路是:

    <camel:routeContext id="customIntegrationASRouteContext" >
    <camel:route id="ACreateClient">
        <camel:from
            uri="spring-ws:rootqname:{http://schema.applicationservices.ws.pro.arri.com}createApplicationRequest?endpointMapping=#endpointMapping&amp;messageFactory=#saajSoapMessageFactory"  />
        <camel:unmarshal>
            <camel:jaxb contextPath="com.arri.pro.ws.applicationservices.schema"
                partClass="com.arri.pro.ws.applicationservices.schema.CreateApplicationRequest" />
        </camel:unmarshal>
            <camel:to
                uri="spring-ws:http://Server-IP:8080/core-application-webapp/ws/AServiceCAS?webServiceTemplate=#webServiceTemplate&amp;messageFactory=#saajSoapMessageFactory"/>
    </camel:route>
</camel:routeContext>

当我看到我的核心应用程序的访问日志时,我会在下面找到:

10.1.60.160 - - [06/Dec/2018:18:51:55 +0530] 8009 8009867 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1116 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:51:55 +0530] 8625 8625440 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1062 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:51:58 +0530] 6113 6113112 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 915 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:51:55 +0530] 9517 9517722 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1126 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:51:58 +0530] 8144 8144110 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1110 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:00 +0530] 8890 8890525 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1114 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:03 +0530] 8732 8732932 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1115 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:03 +0530] 8944 8944747 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1058 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:02 +0530] 12417 12417431 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1112 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:04 +0530] 11983 11983458 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1114 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:14 +0530] 5877 5877943 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 913 ROUTEID CAS_161 CAS_161 -
10.1.60.160 - - [06/Dec/2018:18:52:12 +0530] 8811 8811055 "POST /core-application-webapp/ws/AServiceCAS HTTP/1.1" 200 ROUTEID=.CAS_161; casjsessionid=85uFB_su35-0z2Dxu0PiO-SlrJyvyNByNjCMJyNe2hNDU3C2s6Rb!-614071377; lmsjsessionid=BbyFB82-AkVNLt73DhPcMDLrfoq4W471cQygCverx3ZwZuCCqWPc!1516261276 1122 ROUTEID CAS_161 CAS_161 -

问题是,每个请求都具有相同的cookie,因此,我的集成应用程序在群集中开始将所有请求发送到特定服务器。

0 个答案:

没有答案