??xml version="1.0" encoding="utf-8" standalone="yes"?>
中文Q内Ҏ滞后Q:http://www.oracle.com/technetwork/cn/middleware/ias/downloads/wls-main-091116-zhs.html
Oracle优秀英文博客Q?/p>
来源Q?/b>http://allthingsmdw.blogspot.com/2012/02/multicast-vs-unicast-with-weblogic.html
THURSDAY, FEBRUARY 9, 2012
Multicast Vs. Unicast with WebLogic Clustering
WebLogic Clusters manage membership via messaging within its members. The members join/leave the cluster as well as update other members via messages to the entire cluster. There are two ways for cluster messaging in WLS - Multicast or Unicast. This post goes provides a brief overview of the cluster messaging and some general guidelines around using the different messaging options.
WLS Cluster
WebLogic clustering provides a homogeneous model for managing a set of server instances while providing scalability, load balancing and high availability to the services running within the member instances. For the end client, it appears like one single and uniform service with all the RASP (reliability, availability, scalability, performance) capabilities. Each cluster member is aware of other members and advertise each other services in addition to their own. Refer tohttp://docs.oracle.com/cd/E11035_01/wls100/cluster/failover.html for more details on replication and failover of clustered services.
Unicast & Multicast
Multicast is easier to explain over Unicast. Multicast is a broadcast UDP option for sending a packet/announcement over to a group that is listening on a specific multicast address and port over which the announcement is sent.There is a defined range for valid Multicast address (224.0.0.1 to 239.255.255.255). Everyone listening on the given address hears the announcement just like following a Twitter post. Some limitations with Multicast is the TTL (time to live) across machines/subnets/routers needs to be adjusted and the routers configured to retransmit the multicast packet across subnets. More details on the weblogic specific multicast configurations can be seen in my Exalogic and Multicast blog post.
Unicast is more of a point to point UDP option to send the packet to a specific member and not everyone. That way, unicast is more of a private conversation between two individuals while multicast is more of a shout to a group or room. Both are UDP based, so there can be losses unlike TCP that handles retransmissions on message loss. But Unicast can span across routers and does not have to worry about TTL without the everyone hearing the announcement. So, Network Admins in general prefer to go with Unicast over Multicast for these reasons.
WLS Cluster Configuration
When a cluster is created within a WLS Domain (either via wlst or config wizard or copy/update of existing domain), it is configured as using Unicast or Multicast messaging. As part of complete Cluster configuration, the multicast listen address and port should be specified if going with Multicast option. Also the managed servers should be targeted/added to the Cluster instance. There can be multiple clusters and any given managed server instance can only belong to atmost one cluster (or none). This will let the clustered managed servers (Admin Server should not be part of any cluster nor can cluster span domains) go with Unicast or Multicast when they are started. It should be noted that Multicast used to be the only option in WebLogic prior to 10.0 version while either Unicast or Multicast can be used from version 10 onwards.
Cluster Messaging
How does each member join the cluster and see or recognize others? At bootstrap time, the managed servers get their configuration via JMX MBeans from the Admin server (or from cached configurations if the Admin server was down) and recognize that they belong to a cluster and they have to go with Unicast or Multicast.
WLS Multicast Messaging
So, in a multicast messaging cluster, the managed servers start listening to the specified multicast address once it checks its configuration and knows it belongs to so and so cluster and has to use specified multicast address and port. Once it listens on the specified multicast address, it sends an announcement about its arrival to others via multicast - more like a shout-out. Other running clustered members of the same cluster who are already listening will respond back and add the new member to their list of known cluster members. The new member will also update its cluster list with other members. This process continues as new members get added. The membership gets renewed based on each member sending periodic announcements to other members proclaiming its liveliness. If a member goes down (shutdown or killed or not able to respond), then it wont be able to send its broadcasts and other members will drop it from the cluster list and re-add it when it comes back online. If a member is directly talking to another cluster member, just the direct socket connection is enough in establishing its membership with its connected member. Since multicast is a broadcast, just a single announcement is retain a instance's membership and let others continue to maintain it in their cluster list till its time to renew its membership. Its a mesh where every member can see every other member in the cluster.
WLS Unicast Messaging
With Unicast, WLS divides the cluster into a multiple groups, each having a max of 10 members. The division happens as the servers come up. Each of the server listens on their specified listen address and the other members can send/receive unicast packets over that listen address as every clustered member knows the configurations of other cluster members.
The oldest within the group is designated the group leader. The group leader communicates over Unicast to other members (over the specified member's listen address) within its group and adds/drops them based on them renewing their membership or not responding. The group leaders communicate amongst themselves. So, if there are 4 group leaders, each group having 10 servers, a membership announcement from server1 in group1 will be picked by GroupLeader1 of group1 and retransmitted to all other members within the group1 as well as to other three group leaders. The remaining group leaders will in-turn retransmit the membership information within their groups. This way, every change is picked up and retransmitted by the group leaders to within their group and to other groups via group leader to group leader communication. The group leaders remain the hub for each group while they themselves form a mesh with other group leaders.
Comparison between Unicast & Multicast
Multicast | Unicast |
Only option in pre-10.0 versions of WLS, continues to exist in version 10+ | Available from version 10 onwards |
Requires configurations to Routers, TTL | No configuration required |
Requires configuring the Multicast Listen Address and port | Just specify the listen address (can be Default Channel or use a Custom Network Channel for Cluster communication) |
One announcement to join/maintain membership | one transmission to group leader has to be retransmitted to other group members (N) + to other group leaders (M) who then again retransmit to their group members resulting in (NxM) packets |
Everyone sees everyone | Group Leaders have to do real heavy lifting of retransmitting every thing across its group and other group leaders and can get bogged down in just retransmitting |
Can lead to big broadcasts through the entire subnet/LAN if there are frequent joins/drops of members or change in services (JNDI updates of bound services, frequent app deployments or members going out of sync) | Not a broadcast throughout the subnet/lan, but still more packets to be sent across as Group Leaders have to retransmit everything. Can consume bigger bandwidth |
As listed in the table above, these would be my guidelines:
1. If the cluster is small and simple (under 20 members), go with Unicast. No configurations required and the group leaders wont be stretched retransmitting data.
2. If the Network configurations strictly prohibit multicast and members have to reside in different subnets and cluster sizes are still under or mid-20s, go with Unicast.
3. If its a real large cluster (over 20 members) and members can reside in the same subnet or even if they are not on same subnet but network router configurations can allow multicast, go with Multicast.
4. If over 50 members, change to network configurations to allow multicast and stick with Multicast.
5. Over 100 members, try to break up the domain into multiple separate domains and individual clusters for better administration and management even though Multicast option can handle such large domains. Or use custom scripts/wlst to manage and monitor individual members instead of relying on a single application (like console) to manage/monitor/handle all servers at the domain level.
The reason for recommending Multicast over Unicast for large clusters is due to the work load on the group leaders and retransmissions. The group leaders have to retransmit every member's packet within their group as well as to other group leaders (who again send to their group members) which can just lead to more and more work as the cluster grows bigger.
Another big reason is that WLS Multicast based messaging is quite mature and stable compared to Unicast which got only introduced with version 10. Also, with unicast, there can still be retransmits (as its not auto error correcting) and it can consume more bandwidth due to repeat retransmits by group leaders to others compared to one transmit for multicast.
Conclusions
I hope this article helps clarify the internal working of WLS Cluster membership around Unicast vs Multicast messaging while providing some guidance on the option to use based on requirements and constraints.
Posted by Sabha Parameswaran at 12:33 PM
文档:http://www.oracle.com/technetwork/middleware/weblogic/documentation/index.html
此次同时发布的还?em>Oracle Fusion Middleware 11g R1 (11.1.1.6.x),包含下列产品:
一q137文章,已经上传完毕Q除个别文g因命名问题外上传p|Q?5%的文章已l可以直接浏览或打包下蝲了。WebLogic中文博客目前正在致力于新版本的通用Java中间件监控Y件的研发中(单一软g支持Tomcat, Resin, JBoss, WebLogic, WebSphereQJVMq行状态监控等Q,因此q期不会发表新的技术文章。如果您需要这些文章的word版本Q请联系本h购买Q?a href="mailto:beansoft@126.com">beansoft@126.com 或?QQ 9991483?/p>
下面是所有WebLogic文章索引Q?/p>
2009-11-01 配置 WebLogic Server 11g 集群单服务器版(WindowsQ?pdf
2009-11-06 WebLogic Server 11g节点理器和Machine配置单机版(WindowsQ?pdf
2009-11-06 关于Spring和WebLogic版本兼容的一点小提示.pdf
2009-11-09 WebLogic 11g 如何修改 Console 的端?pdf
2009-12 Weblogic 11 集群和节点管理器配置快速入门视?单服务器?.pdf
2010-01-25 WebLogic各个版本对JDK和Spring的支持度.pdf
2010-03-23 JNDI 讉K外部 WebLogic 11 数据源的操作步骤.pdf
2010-05-07 Oracle WebLogic Server 11g Rel 1 (10.3.3) 发布.pdf
2010-07-15 WLST on Weblogic 8.1下蝲地址(?.pdf
2010-08 WebLogic 9.2.4.0 发布.pdf
2010-08-13 WebLogic 11g 下蝲地址?OEPE所有版本官方下载地址及所有版本文?edoc)阅读下蝲地址.pdf
2010-08-16久违或遗忘的WebLogic Java工具.pdf
2010-08-19 单的HelloWorld Portal 应用(for WLS 10).pdf
2010-08-20韩国wls监控 WLMonitor 2.5 beta 1 英文版下?pdf
2010-08-31 Where to download file wlfullclient.jar.pdf
2010-09-09 WebLogic和JDK版本E_度排行榜.pdf
2010-09-10 WebLogic静默卸蝲与安装[Slient Install and Uninstall].pdf
2010-11-26 WebLogic集群实现HTTP复制的简单步?pdf
2010-12-09 WebLogic Edoc中关于weblogic.Deployer的一点小问题.pdf
2011-02-27 如何修改weblogic默认U程池大?pdf
2011-02-28 如何破解WebLogic理密码.pdf
2011-03 WebLogic如何使用GridLinkq接RAC数据?pdf
2011-04-18 WebLogic散包部v用热加?pdf
2011-05-07 WebLogic 10.3.5正式发布,提供下蝲.pdf
2011-05-22 ZJMS的Weblogic Server Webservice开?pdf
2011-05-22ZJMS的Weblogic Server Webservice开?pdf
2011-07-03 WebLogic 10.3.4支持JDK 7.pdf
2011-07-26借助 SAML 实现 WebLogic Server 9.2 单点d相关文章.pdf
2011-07-28同时使用Oracle Exalogic Elastic Cloud和Exadata Database Machine的SquareTwo Financial公司[转].pdf
2011-07-31 3D立体展示 Oracle Exalogic Elastic Cloud X2-2.pdf
2011-08-03 关于WebLogic Windows 7版本.pdf
2011-08-04 ExaLogic EL X2-2 Edoc在线阅读及下载地址,安装视频.pdf
2011-08-12 WebLogic如何处理socket muxers[转].pdf
2011-08-23 Weblogic 10.3.5?4位Windowspȝ下的安装和配|?pdf
2011-08-24 WebLogic中的监视仪表?图文,视频).pdf
2011-08-26 WEBLOGIC JMS 点对炚w|详?pdf
2011-08-29使用WLST创徏和删除DataSource.pdf
2011-08-30 WebLogic Express是免费的?WebLogic是免费的?pdf
2011-08-30 WLST快速创建单机Domain.pdf
2011-08-31 Solaris下如何安装WebLogic.pdf
2011-09-02使用代理插g时群集中?HTTP 负蝲q问题[转].pdf
2011-09-04 AIX下WebLogic安装操作手册[转].pdf
2011-09-10调试基本WebLogic JDBC问题[转].pdf
2011-09-29 优化WebLogic 8服务器性能参数[转].pdf
2011-10 WebLogic Server Blog 内容收藏.pdf
2011-10-07 DomainHealth 1.0.0 发布.pdf
2011-10-10 使用WLST配置WebLogic密码{略.pdf
2011-10-19 WebLogic NodeManager q程d漏洞补丁下蝲.pdf
2011-11 GlassFish 4.0 视频曝光,控制台酷似WebLogic.pdf
2011-11-09 WebLogic Web 应用映射到根目录.pdf
2011-11-28 如何抓取Thread Dump结.pdf
2011-12 Oracle WebLogic Server 12c (12.1.1)正式发布.pdf
2011-12 WebLogic所有版本Edoc在线阅读及下载地址.pdf
2011-12 转蝲Qweblogic cd载机?pdf
2011-12-02 Weblogic - Socket Muxers in Thread Dumps[转].pdf
2012-01-29各个版本WebLogic所支持的JDK及JavaEE版本.pdf
Accessing JMX for Oracle WebLogic 11g.pdf
BEA Weblogic Server宝典[中文囄版] [PDF].pdf
BEA Weblogic、Tuxedo 下蝲地址[转].pdf
BEA 产品文档[转].pdf
BEA-000337 错误解决[转].pdf
BEA-000402问题解决 but the maximum number of socket reader threads allowed by the configuration is.pdf
BEA公司被收购前所有版本Y件支持的操作pȝ{配|信息列?pdf
chaowang在甲骨文C日的演讲教材下蝲.pdf
Debugging WebLogic Platform Internals.pdf
Enable IIOP and default user for the WebLogic server[转].pdf
Installing Oracle WebLogic Server and Creating a Domain [Linux].pdf
Jython相关文章收藏.pdf
Linux下Weblogic 11g jar格式安装包如何安?pdf
Managing WebLogic servers with JConsole.pdf
Monitoring WebLogic 9 using JMX.pdf
Oracle Fusion Middleware支持的JDK{系l配|列表信?pdf
Oracle WebLogic Integration.pdf
Oracle WebLogic Server 11g Monitor and Tune Performance评介绍[转].pdf
Oracle WebLogic Server Enterprise Edition 报h.pdf
Oracle WebLogic Server Information Center[转].pdf
Oracle官方关于WebLogic服务有效期的文档.pdf
Performance and Tuning for Oracle WebLogic Server 11g[PDF] Download.pdf
Reason of java.lang.InternalErrorQ?erroneous handlers.pdf
startWebLogic.sh启动p|Q提CError initializing Embedded LDAP Server错误.pdf
WebLogic 10.3.4正式发布,提供下蝲,支持JSF 2.0, JPA 2.0和JAX-RS 1.1[图].pdf
WebLogic 10各个版本详细名称.pdf
Weblogic 11g 安装部v手册.pdf
WebLogic 11gR1 PS3所有BEA错误代码详细信息列表.pdf
WebLogic 8 debug flags.pdf
WebLogic 8 监控 wlstat 0.2, 方便监控weblogic的Sockets,jvm,jdbc,threads,session.pdf
WebLogic 8.1 FTP 下蝲地址(Windows版本).pdf
WebLogic 8.1.6 Windows 安装包下?pdf
WebLogic 8.1.6的所有BEA错误代码索引.pdf
WebLogic 9 实现ZOracle数据库的用户w䆾存储CZ代码.pdf
Weblogic 9.2 部v 8.1 下运行的 EAR 出错的部分解x?pdf
WebLogic 9.2的所有BEA错误代码索引.pdf
Weblogic for aix操作手册.pdf
WebLogic JDBC 驱动的配|?pdf
WebLogic JSP Servlet U程时讄参数.pdf
WebLogic Portal服务器配|手?pdf
WebLogic Server 10.3.4 Released ?Key APIs of Java EE 6 and More[转].pdf
WebLogic Server 9 ?Web Service ~程?JWS.pdf
WebLogic Server 9.2 集群配置单服务器?pdf
WebLogic Server 9.2 集群配置单服务器版和多服务器?PDF).pdf
WebLogic Server 9.2 集群配置多服务器?pdf
WebLogic versioned deployment side-by-side[转].pdf
WebLogic 最新版本下载地址.pdf
weblogic.Admin[转].pdf
weblogic.security.internal.encryption.EncryptionServiceExceptionQ?com.rsa.jsafe.JSAFE_PaddingExceptionQ?Could not perform unpaddingQ?invalid pad byte.pdf
weblogic.utils.classloaders.FilteringClassLoader所在包.pdf
WebLogic8.1打印详细的jdbc日志.pdf
Weblogic8.1集群中批量启动和关闭所有服务器的脚本[转].pdf
weblogic9 jdbc日志跟weblogic8的区?pdf
WebLogic公司发展?pdf
WebLogic启用域之间的跨域安全 Enable Cross Domain Security between domains[转].pdf
WebLogic如何强制先加载WEB-INFQlib下的jar.pdf
WebLogic如何更换64位JDK[转].pdf
WebLogic密码恢复Q一Q[转].pdf
WebLogic密码恢复Q二Q[转].pdf
Weblogic的Machine,Server,Domain,Cluster的关p?pdf
WebLogic集群环境下如何访问EJB实现负蝲均衡.pdf
WLS10.3.0中,q接试D的connection pool shrinking(disabling)问题分析[转].pdf
WLST脚本获取ThreadDump[转].pdf
[WebLogic]dev2dev 2004 合订本下?pdf
[转]EJB在Weblogic Server集群中的实现.pdf
[转]WebLogic 10.3.4 新功能:CAT - Classloader分析工具.pdf
[转]WebLogic ClassCastException 错误解析.pdf
[转]WebLogic Server注册为Windows服务.pdf
【{】Weblogic挂v、宕机问题分析及优化.pdf
使用VisualVMq程监控WebLogic服务器JVM.pdf
使用WLST监控应用状态[转].pdf
使用WLST脚本列出JMS队列中的消息.pdf
删除WebLogic 10的缓存[转].pdf
原dev2dev的WebLogic General_֍贴?pdf
如何抓取Thread Dump结.pdf
开发自定义的MBean来管理J2EE应用(W四部分)[转].pdf
惛_WLST中运行本机命?pdf
监控U程执行情况,耗光时自动输出thread内容[转].pdf
单的Oracle WebLogic 11g安装部属手册(PDF).pdf
?多机nodemanager试记&weblogic103.pdf
配置ZCoherence 的WebLogic Server会话理[转].pdf
Weblogic 8.1 JNDI 教程PPT.swf
WebLogic Server 8.1 Performance Tuning Guide(调优中文文档).swf
对WebLogic Server JNDI 启用安全讄.swf
讄WebLogic集群(WebLogic 10 中文文档).swf
作?/span>: 刘长?BeanSoft@126.com 日期: 2011-11-28 本文环境: JDK 1.5/1.6, WebLogic 9.0 or later
当服务器挂v,崩溃或者性能底下?/span>,需要抓取服务器的线E堆?/span>(Thread Dump)用于后箋的分?/span>. Thread dump提供了当前活动的U程的快?/span>. 它提供了JVM中所?/span>JavaU程的栈跟踪信息 有很多方式可用于获取Thread Dump, 一些是操作pȝ特定的命?/span>. 操作pȝ命o获取ThreadDump: Windows: 1. 转向服务器的标准输出H口q按?/span>Control + Breakl合?/span>, 之后需要将U程堆栈复制到文件中 UNIX/ Linux 首先查找到服务器的进E号(process id), 然后获取堆栈. 1. ps –ef | grep java 2. kill -3 <pid> 注意一定要谨慎, 一步不慎就可能让服务器q程被杀?/span>! JVM 自带的工兯取线E堆?/span>: JDK自带命o行工兯?/span>PIDq做ThreadDump: 1. jps 2. jstack <pid> 使用JVisualVM: Threads 标签?/span>àThreadDump按钮. WebLogic 自带的获?/span> thread dump的工?/span>: 1. webLogic.Admin 工具 a. 打开命o提示W?/span>, 通过q行<DOMAIN_HOME>/bin/setDomain.env讄相关c\?/span> b. 执行下面的命?/span> java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblogic1 THREAD_DUMP 注意: Thread Dump 会打印到标准输出, ?/span>nohup日志或者进E窗?/span>. 2. 使用 Admin Console a. d Admin Console , 点击对应的服务器 b. 点击Server à Monitoring àThreads c. 点击: Dump Thread Stack 按钮 3. 使用WLST (WebLogic Scripting Tool) connect(‘weblogic?'weblogic1?’t3://localhost:7001? cd(‘Servers? cd(‘AdminServer? threadDump() disconnect() exit() 注意: U程堆栈会保存在运?/span>wlst的当前目录下. 4. 使用utils.ThreadDumper 用法: C:\bea\wlserver_10.3\server\lib>java -cp weblogic.jar utils.ThreadDumper Broadcast Thread dumps disabled: must specify weblogic.debug.dumpThreadAddr and weblogic.debug.dumpThreadPort Exception in thread "main" java.lang.IllegalArgumentException: Port out of range :-1 at java.net.DatagramPacket.setPort(Unknown Source) at java.net.DatagramPacket.<init>(Unknown Source) at java.net.DatagramPacket.<init>(Unknown Source) at utils.ThreadDumper.sendDumpMsg(ThreadDumper.java:124) at utils.ThreadDumper.main(ThreadDumper.java:145) 5. 如果服务器是作ؓWindows服务的方式运?/span>, 误行下列命?/span>: WL_HOME\bin\beasvc -dump -svcname:service-name 其它一些获?/span>Thread Dump的工hjrcmd, jrmc(JRockit VM自带) ,Samurai, JProfiler{?/span>, q可通过JMX~程的方式获?/span>, ?/span>JDK自带CZ代码: $JAVA_HOME\demo\management\FullThreadDump
]]>