Brief analysis of Dynamicserverlist in WEBLOGIC10 plugin

Source: Internet
Author: User

In almost all of the larger enterprise environments using WebLogic, cluster is used, and cluster is bound to use proxy, and proxy has many, Apache, IIS and WebLogic to provide httpclusterservlet. Plugin configuration parameters are many, can refer to the link below, http://e-docs.bea.com/wls/docs92/plugins/plugin_params.html#wp1157622. In this article, we mainly look at what the dynamicserverlist internal implementation looks like.

First, let's take a look at Dynamicserverlist's specific explanation, the default is enable,

When set to out, the plug-in ignores the dynamic cluster list used for load balancing requests proxied the plug-in D only uses the static list specified with the Weblogiccluster parameter. Normally this parameter should remain set to on. There are some implications for setting this parameter to OFF:

1:if one or more servers in the static list fails, the plug-in could waste time trying to connect to a dead server, result ing in decreased performance.

2:if you add a new server to the cluster, the plug-in cannot proxy requests to the new server unless your redefine this par Ameter. WebLogic server automatically adds new servers to the dynamic Server list when they become part of the cluster.

As can be seen from the above description, Dynamicserverlist is used to enable proxy to get the list of servers in the backend cluster in real time (for example, member additions, deletions, and changes in Member States in cluster (startup, Shutdown), so that the proxy can avoid the try dead server when the load balance request. You can also dispatch the request to a new member in cluster (for example, the predefined cluster has server1, Server2, and at some point it is found that the backend server load is higher and a new Server3 is added. If Dynamicserverlist is on, you don't need to redefine weblogiccluster, and of course you don't need to restart plugin. Incidentally, when Dynamicserverlist is on, weblogiccluster in the corresponding web.xml of http.conf or httpclusterservlet do not need to define all cluster member, Specify any one.

Weblogiccluster 10.130.2.41:7021,10.130.2.42:7021,10.130.2.43:7021

Weblogiccluster 10.130.2.41:7021

The above two methods are equivalent, but if the dynamicserverlist is off, then the above must be used.

Let's look at how the proxy perceives changes in the back-end cluster state, thereby updating the server list in its own hands in time to increase the speed of dispatch request.

1:plugin End (Take Httpclusterservlet as an example)

When plugin processes a client-side request, it dispatch the request to the back-end server and adds a internal in the HTTP header named X_weblogic_request_clusterinfo Header, as follows:

Httpclusterservlet.java

1 protected void addRequestHeaders(HttpServletRequest request, PrintStream headerOut, Object o1, Object o2) {
2     super.addRequestHeaders(request, headerOut, o1, o2);
3
4     headerOut.print(ServletResponseImpl.X_WEBLOGIC_REQUEST_CLUSTERINFO + ": true");
5     headerOut.print(EOL);
6 }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.