• 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • The Cluster object

    Table of Contents

    Introduction

    七乐彩开奖结果 www.eleieg.com The tomcat cluster implementation provides session replication, context attribute replication and cluster wide WAR file deployment. While the Cluster configuration is fairly complex, the default configuration will work for most people out of the box.

    The Tomcat Cluster implementation is very extensible, and hence we have exposed a myriad of options, making the configuration seem like a lot, but don't lose faith, instead you have a tremendous control over what is going on.

    Security

    The cluster implementation is written on the basis that a secure, trusted network is used for all of the cluster related network traffic. It is not safe to run a cluster on a insecure, untrusted network.

    There are many options for providing a secure, trusted network for use by a Tomcat cluster. These include:

    • private LAN
    • a Virtual Private Network (VPN)
    • IPSEC

    Engine vs Host placement

    You can place the <Cluster> element inside either the <Engine> container or the <Host> container.
    Placing it in the engine, means that you will support clustering in all virtual hosts of Tomcat, and share the messaging component. When you place the <Cluster> inside the <Engine> element, the cluster will append the host name of each session manager to the managers name so that two contexts with the same name but sitting inside two different hosts will be distinguishable.

    Context Attribute Replication

    To configure context attribute replication, simply do this by swapping out the context implementation used for your application context.

    <Context className="org.apache.catalina.ha.context.ReplicatedContext"/>

    This context extends the Tomcat StandardContext so all the options from the base implementation are valid.

    Nested Components

    Manager:
    The session manager element identifies what kind of session manager is used in this cluster implementation. This manager configuration is identical to the one you would use in a regular <Context> configuration.
    The default value is the org.apache.catalina.ha.session.DeltaManager that is closely coupled with the SimpleTcpCluster implementation. Other managers like the org.apache.catalina.ha.session.BackupManager are/could be loosely coupled and don't rely on the SimpleTcpCluster for its data replication.

    Channel:
    The Channel and its sub components are all part of the IO layer for the cluster group, and is a module in it's own that we have nick named "Tribes"
    Any configuring and tuning of the network layer, the messaging and the membership logic will be done in the channel and its nested components. You can always find out more about Apache Tribes

    Valve:
    The Tomcat Cluster implementation uses Tomcat Valves to track when requests enter and exit the servlet container. It uses these valves to be able to make intelligent decisions on when to replicate data, which is always at the end of a request.

    Deployer:
    The Deployer component is the Tomcat Farm Deployer. It allows you to deploy and undeploy applications cluster wide.

    ClusterListener:
    ClusterListener's are used to track messages sent and received using the SimpleTcpCluster. If you wish to track messages, you can add a listener here, or you can add a valve to the channel object.

    Deprecated configuration options

    Deprecated settings: In the previous version of Tomcat you were able to control session manager settings using manager.<property>=value. This has been discontinued, as the way it was written interferes with the ability to support multiple different manager classes under one cluster implementation, as the same properties might have the different effect on different managers.

    Attributes

    SimpleTcpCluster Attributes

    Attribute Description
    className

    The main cluster class, currently only one is available, org.apache.catalina.ha.tcp.SimpleTcpCluster

    channelSendOptions

    The Tribes channel send options, default is 8.
    This option is used to set the flag that all messages sent through the SimpleTcpCluster uses. The flag decides how the messages are sent, and is a simple logical OR.

    int options = Channel.SEND_OPTIONS_ASYNCHRONOUS |
                  Channel.SEND_OPTIONS_SYNCHRONIZED_ACK |
                  Channel.SEND_OPTIONS_USE_ACK;

    Some of the values are:
    Channel.SEND_OPTIONS_SYNCHRONIZED_ACK = 0x0004
    Channel.SEND_OPTIONS_ASYNCHRONOUS = 0x0008
    Channel.SEND_OPTIONS_USE_ACK = 0x0002
    So to use ACK and ASYNC messaging, the flag would be 10 (8+2)
    Note that if you use ASYNC messaging it is possible for update messages for a session to be processed by the receiving nodes in a different order to the order in which they were sent.

    channelStartOptions

    Sets the start and stop flags for the <Channel> object used by the cluster. The default is Channel.DEFAULT which starts all the channel services, such as sender, receiver, multicast sender and multicast receiver. The following flags are available today:

    Channel.DEFAULT = Channel.SND_RX_SEQ (1) |
                      Channel.SND_TX_SEQ (2) |
                      Channel.MBR_RX_SEQ (4) |
                      Channel.MBR_TX_SEQ (8);

    To start a channel without multicasting, you would want to use the value Channel.SND_RX_SEQ | Channel.SND_TX_SEQ that equals to 3.

    heartbeatBackgroundEnabled

    Flag whether invoke channel heartbeat at container background thread. Default value is false. Enable this flag don't forget to disable the channel heartbeat thread.

    notifyLifecycleListenerOnFailure

    Flag whether notify LifecycleListeners if all ClusterListener couldn't accept channel message. Default value is false.

    Comments

    Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

    If you have trouble and need help, read Find Help page and ask your question on the tomcat-users 七乐彩开奖结果. Do not ask such questions here. This is not a Q&A section.

    The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

  • 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • 庄闲大小规则 热门网络赚钱游戏 五七相合是特玛猜一肖 腾讯分分彩官方走势图 棒球忍者街机手机版 七乐彩坐标走势图带连线位差 福彩开乐彩 中国竟彩网258 怎么看足球指数 青岛新闻网手机版官网 七星彩在今晚开奖结果 齐鲁风采双色球开奖号码 青海十一选五走势图 秒速时时彩 澳门小神仙118图