07TIBCO EMS Fault Tolerance
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
• Testing the Fault Tolerant Servers with Queues
Load Balance Lab:
• Configuring a Load Balanced EMS Server
• Testing the Load Balanced Servers
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
NON_PERSISTENT delivery mode
• Messages are stored in memory • Not guaranteed to be recovered after failover
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Fault Tolerant Server Setup
Parameters to configure in ‘tibemsd.conf’:
• ‘server’
– must be set to same value for both primary and secondary server
• ‘ft_active’
– must be set to URL of the other server in the pair
• ‘ft_reconnect_timeout’
– amount of time, in seconds, backup server waits for clients to reconnect before their state is removed from shared storage (default value=60)
• Number of connections
• Bit rate
There is no need for specialized hardware or software. Can be defined in the application or through JNDI connection factory.
• sync.db
– Messages for failsafe destinations
• async.db
– Messages for non-failsafe destinations
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
These can be set on command line while starting server Communication between primary and backup server can be secured using SSL
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Failover and Message Delivery
Message delivery mode plays important role PERSISTENT delivery mode
• Messages are stored on disk • Available during failover
• ft_activation
– Time elapsed between last heartbeat received (default = 10sec)
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Shared state must be accessible to both primary and backup server LOCK mechanism to control access
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Load-Balanced EMS
Groups EMS servers or server FT pairs can be logically groups to balance connections services. Connections can be distributed based on two metrics:
Fault-Tolerance EMS Demo
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Lab
Failover Lab:
• Configuring a Backup EMS Server
Controlling Storage
Three parameters in ‘tibemsd.conf’
• store_minimum
• store_crc
• store_truncate
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Case Study: Single Server Failover
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Primary and Backup Server
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
TIBCO EMS Fault Tolerance
Yin Shiwei Adapter Dev Team
© 2005 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Agenda
Describe failover capabilities of TIBCO EMS Explain failover setup in EMS Identify EMS Server behavior during failover Identify EMS Client behavior during failover
Storage Files
Location –controlled by ‘store’ parameter in tibemsd.conf
• Store = <storage-directory>
Three storage files
• meta.db
– Stores information needed bBiblioteka Baidu server, No messages
• Session.recover() should be called if received exception javax.jms.IllegalStateException
Transacted Session
• May receive exception javax.jms.TransactionRolledBackException
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Detecting Failover
Two ways to detect failure of primary
• Loss of connection between the servers
Shared State
State of a server includes
• Persistent messages for queues and topics
• Information about client connections
• Metadata regarding data delivery
• Loss of Heartbeats
Parameters from ‘tibemsd.conf’
• ft_heartbeat
– Time interval between two heartbeats from primary to backup server (default = 3sec)
Client Setup for Fault Tolerance
Client applications must specify multiple URLs as part of connection to EMS Server
URLs are specified as comma-separated list of URLs
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Load-Balanced EMS Demo
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Message Delivery on Failover
Topic
• All topic subscribers continue normal operation after a failover
Queue
• All the un-acknowledged messages will be delivered to receivers
The Power of Now
© 2005 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
List of URLs is tried in the order, until all are tried Clients must connect to primary and backup with same protocol ‘tcp’or ‘ssl’ Example:
• create factory MyFactory topic url=tcp://server0:7222, tcp://server1:7344
© 2003 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary.
Failover
High availability Servers act in a pair
• Primary
– Accepts client connections – Performs work of handling JMS messages
• Secondary/Backup server
– Acts as backup for primary – When primary fails, resumes operations and acts as primary
Primary and backup server must have access to a shared state