[Design of Clustering on JBoss (Clusters/JBoss)] - Re: Handling cluster state when network partitions occur
by bstansberry@jboss.com
I said right off it was flawed didn't I? :)
Only benefit to it is it's dynamic. But, I suppose if people want things to be completely dynamic they shouldn't expect this kind of functionality. They should be using redundant power supplies, IP bonding and redundant networks.
Re: disabling access if this occurs, there's no standard HTTP status code (e.g. 410) to tell a load balancer to fail over. All the HTTP status codes propagate to the client. With mod_jk, they're working on a much more rich communication between the Tomcat side and the Apache side, so all sorts of status information about the cluster could be passed. With other load balancers from major vendors we could send a custom HTTP header; we'd need to coordinate with the vendors to get them to understand the header. If none of those options are available, we'd have to shut down the connector.
I want to have pluggable policies for configuring this kind of thing. An expansion on the existing "useJK" flag.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084536#4084536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084536
17 years, 1 month
[Design of Clustering on JBoss (Clusters/JBoss)] - Re: Handling cluster state when network partitions occur
by bela@jboss.com
"bstansberry(a)jboss.com" wrote :
|
| To make any kind of custom MergeHandler useful, JBC would need to expose an API to let the handler get the info it needs from around the cache. That's likely to be a pretty complex API.
|
This does not necessarily need to be provided by JBossCache; you could have an external service (e.g. an RpcDispatcher/ClusterPartition running on a Multiplexer), and fetching the necessary information *outside of JBossCache*.
anonymous wrote :
| Another flawed way is tracking view size and when views change. As the view size increases, keep recalculating your primary partition size. As view size decreases, check how rapidly it's decreasing. A rapid decrease below the primary partition size == cluster split. A slow decrease == normal leaving of nodes, so recalc the primary partition size.
That's a bit non-deterministic, what is *slow* ? It is as sloppy as using timeouts...
Any policy works to pick the primary partition, as long as it is deterministic. Note that here we're not just talking about *MergViews* but regular *Views* as well !
For example, a SplitBrainPolicy for primary partition could be
- 3 members or more
OR
- Host A is part of the view
I think this works pretty well, for views and merge views. When not in the primary partition, we could shut down the node. Ie. disconnect from the channel, disable the Connector (in JBossWeb) and/or send 404 or some HTTP error codes back to mod_jk so Apache knows not to send any more requests to this node.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084521#4084521
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084521
17 years, 1 month
[Design of Clustering on JBoss (Clusters/JBoss)] - Re: Handling cluster state when network partitions occur
by bstansberry@jboss.com
"manik.surtani(a)jboss.com" wrote : Ok, how about:
|
| * Provide a MergeHandler configuration
| * Defaults to IgnoreOnMerge, which does nothing. FlushOnMerge also provided, which flushes in-memory state on merge
| * Allows users to write their own MergeHandlers, which are basically called when a MergeView is received.
| * Users could also do something similar in a CacheListener's viewChange() callback.
|
To make any kind of custom MergeHandler useful, JBC would need to expose an API to let the handler get the info it needs from around the cache. That's likely to be a pretty complex API.
anonymous wrote :
| But more important than this, how can an instance tell if there has been a split, and it is not in the primary partition *before* a merge takes place? E.g., in your example of {A,B,C} and {D,E}, how can instance E decide to shutdown and not process requests?
One way is the kind of static configuration Bela mentioned. User expect he a 5 node cluster; declares 3 as the minimum primary partition size.
Another flawed way is tracking view size and when views change. As the view size increases, keep recalculating your primary partition size. As view size decreases, check how rapidly it's decreasing. A rapid decrease below the primary partition size == cluster split. A slow decrease == normal leaving of nodes, so recalc the primary partition size.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084515#4084515
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084515
17 years, 1 month
[Design of Messaging on JBoss (Messaging/JBoss)] - How to obtain getMessageCounters for a Topic
by leonv
>From my application I?m publishing messages to the testTopic topic.
This application is not running under Jboss.
Does anyone know how I can obtain the Message counters ... getMessageCounters() for a given topic?
See:
http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone...
As base I'm using the out of the box jboss-4.2.1.GA installation without ANY configuration change.
In the file:
\jboss-4.2.1.GA\server\default\deploy\management\console-mgr.sar\web-console.war\TopicSubscriptions.jsp
Is almost what I needed.
Almost since this page return exceptions.
(If it works I can reformat the output to XML)
Try:
http://localhost:8080/web-console/TopicNavigation.jsp?ObjectName=testTopic
And click subscriptions.
per.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: javax.management.MalformedObjectNameException: Key properties cannot be empty
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:535)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspTagException: javax.management.MalformedObjectNameException: Key properties cannot be empty
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
org.apache.jsp.TopicSubscriptions_jsp._jspService(TopicSubscriptions_jsp.java:208)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.servlet.jsp.JspTagException: javax.management.MalformedObjectNameException: Key properties cannot be empty
org.jboss.console.plugins.helpers.servlet.MBeanTag.doStartTag(MBeanTag.java:95)
org.apache.jsp.TopicSubscriptions_jsp._jspService(TopicSubscriptions_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
If JMX is the only solution, does somebody has a piece of example code?
Thanks for any help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084488#4084488
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084488
17 years, 1 month
[Design of Clustering on JBoss (Clusters/JBoss)] - JBAS-4719 (JBCLUSTER-186) Invoker implementations need equal
by ScottMarlowNovell
Hi,
I created JBAS-4719 yesterday for a problem that I hit in two different ways. PooledInvokerProxy doesn't have an equals method which means that comparing two instances with the same underlying address will not match.
This happens in the load balancers. A cluster membership change introduces a new arraylist of targets. After that occurs, attempts to find the current server in the new arraylist of targets will fail, even though the current server address may exist in the new arraylist of targets.
The other case is during fail-over we attempt to remove a bad server from the list of servers, but fail to remove the server for the same reason.
I attached a patch for PooledInvokerProxy to address JBAS-4719 issue.
The list of different invokers (in 4.2 branch) are:
HttpInvokerProxy
HttpInvokerProxyHA
JRMPInvoker
JRMPInvokerHA
JRMPInvokerProxy
JRMPInvokerProxyHA
LocalInvoker
UnifiedInvokerProxy
UnifiedInvokerHAProxy
Should we try to add equals/hashCode to all of the invokers?
It looks like UnifiedInvokerProxy could implement equals using its "locator" member variable. I'm not sure about the other ones.
Comments?
Scott
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084473#4084473
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084473
17 years, 1 month