- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有 3 台安装了 Ubuntu 的服务器,我想配置 Tomcat 负载平衡。
Server A = 10.0.0.1,
Server B = 10.0.0.2,
Server C = 10.0.0.3
我已将域指向安装了 Apache 和 Mod_JK 的服务器 A。而服务器 B 和 C 有 Apache Tomcat 8。下面是我的 workers.properties 文件的详细信息
workers.apache_log=/var/log/apache2 worker.list=tomcatlb,status
worker.stat1.type=status
worker.tomcat1.type=ajp13 worker.tomcat1.host=10.0.0.2 #put your app
host here worker.tomcat1.port=8009 worker.tomcat2.type=ajp13
worker.tomcat2.host=10.0.0.3 worker.tomcat2.port=8009
worker.tomcat1.lbfactor=1 worker.tomcat2.lbfactor=1
worker.tomcatlb.type=lb
worker.tomcatlb.balance_workers=tomcat1,tomcat2
worker.list=jkstatus worker.jkstatus.type=status
我还在 Apache Tomcat 的 server.xml 中使用 jvmRounte 名称作为 tomcat1 和 tomcat2。
我还在 server.xml 中添加了以下行
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.4"
port="45564" frequency="500"
dropTime="3000"/>
<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto" port="4001" autoBind="100"
selectorTimeout="5000" maxThreads="6"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interc eptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
context.xml 如下所示
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>
<Manager className="org.apache.catalina.ha.session.BackupManager" />
</Context>
apache 配置有以下几行
RewriteEngine on
RewriteRule ^/$ /test [PT,L]
JkMount /* tomcatlb
apache 通过 mod_jk 将请求重定向到 Tomcat,它工作正常,但是当一个 tomcat 出现故障时,它应该将请求重定向到另一个 tomcat,而不是我必须重新登录,因为它没有复制 session 。
最佳答案
我发现你不见了stickysession=JSESSIONID|jsessionid lbmethod=byrequests nofailover=Off connectiontimeout=5 timeout=30
关于java - Apache Tomcat 负载均衡集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42003760/
如何检查枚举是否等于可能情况之一。有没有比以下更好的解决方案: [.orderedAscending, .orderedSame].contains(Calendar.current.compare(
我正在尝试使用 openCV 和 C++ 来均衡 HSV 图像的直方图。我知道有些带有 openCV 的库可以为我执行此操作,但我想手动尝试以了解该方法。 我假设均衡将在 HSV 图像的 V chan
我有一个包含多个列的表格。这些列可以包含不同大小的内容,因此高度会有所不同。 我想做的是调整单个元素的高度,使它看起来像这样: . .table { display: flex; ba
:) 我有一个小问题: 我有一个 div,在里面有两个 div,一个挨着另一个。左边的一个在调整大小时改变其高度以保持其与宽度的关系,我希望右边的一个与左边的高度相同;我在文档末尾的 jQuery 中
我正在尝试在 YAML 中创建三列布局。我正在使用此框架的网格功能来定位列(导航、内容、侧边栏)。 我的问题:如何将所有三个 div 的高度设置为相同的大小。 YAML 应该提供 ym-equaliz
这个问题在这里已经有了答案: How do I keep two side-by-side div elements the same height? (24 个答案) 关闭 5 年前。 有没有一种
好像我的 JavaScript 没有听我的。我只是想将所有 anchor 的高度设置为等于这些 anchor 的最高高度。 HTML {{products.title}}
我想对同一主题的两个半脸彩色图像进行均衡,然后将它们合并。它们每个都有不同的色调饱和度和亮度值....使用 opencv 我如何标准化/均衡每个半图像? 我尝试执行 cvEqualizeHist(v,
当一个div高度很大时,我想等于两个div的高度 例子: B ACD Div 2 的高度大于 div 1 最佳答案 我可能有一个可能的解决方案: http://jsfiddle.net/adaz/w
我正在尝试做类似的事情(我已经删除了不必要的东西) Models.Parent.findAll({ where: { parent_id: {
我在 node 中使用 typescript,它在开发模式下运行良好,通过使用以下命令运行我的 index.ts 和 ts-node。 ts-node src/index.ts 但是当我将 types
我是一名优秀的程序员,十分优秀!