Monday, June 23, 2008

Weblogic Interview questions -3

The Multicast TTL setting for a cluster in the WebLogic Admin console sets which of the following values?
a. Maximum time taken for multicast messages to reach their final destination
b. The number of routers a multicast message can pass through before the packet can be discarded
c. The multicast address to be used by the messages sent from the cluster
d. Minimum time taken for broadcasting a multicast message from the cluster


Choice B is correct. The Multicast TTL(TTL-Time to Live) setting specifies the number of routers a multicast message can pass through before the packet can be discarded. To configure the multicast TTL for a cluster, you should change the Multicast TTL value in the WebLogic Server administration console. This sets the number of network hops a multicast message makes before the packet can be discarded.
If you choose to distribute a cluster over a WAN (or across multiple subnets), you must plan and configure your network topology to ensure that multicast messages are reliably transmitted to all servers in the cluster. One of the requirements to be met by the network is that the multicast Time To Live (TTL) value must be high enough to ensure that routers do not discard multicast packets before they reach their final destination.

Which of the following algorithms is used by the WebLogic Server as the default load balancing strategy for clustered object stubs when no algorithm is specified ?
a. Round-robin
b. Weight-based
c. Random
d. None of the above


8. Choice A is correct. The basic idea behind load balancing is that by distributing the load proportionally among all the servers in the cluster, the servers can each run at full capacity. WebLogic Server clusters support several algorithms for load balancing clustered objects. The particular algorithm you choose is maintained within the replica-aware stub obtained for the clustered object. Configurable algorithms for load balancing clustered objects are: Round-robin, Weight-based and Random.
WebLogic Server uses the round-robin algorithm as the default load balancing strategy for clustered object stubs when no algorithm is specified. Round-robin is the only load balancing strategy used by WebLogic proxy plug-ins for HTTP session state clustering. The round-robin algorithm cycles through a list of WebLogic Server instances in order. For clustered objects, the server list consists of WebLogic Server instances that host the clustered object. For proxy plug-ins, the list consists of all WebLogic Servers that host the clustered servlet or JSP.

Which of the following attributes in the Monitoring tab for a JDBC connection pool in the Administrative console tell us how many clients are currently waiting for a connection?
a. Waiters high
b. Waiters
c. Connections high
d. Clients
e. Wait seconds high


Choice B is correct. JDBC subsystem resources can also be monitored via the Administration Console. The Monitoring tab for a JDBC connection pool allows you to access a table listing statistics for the instances of that pool. These attributes provide important information for managing client database access.
The Waiters High field indicates the highest number of clients waiting for a connection at one time. The Waiters field tells you how many clients are currently waiting for a connection. The Connections High field indicates the highest number of connections that have occurred at one time. The Wait Seconds High field tells you the longest duration a client has had to wait for a database connection. These attributes allow you to gauge the effectiveness of the current configuration in responding to client requests.

How do I do HTTP tunneling?
If you want to use HTTP tunneling (wrap every message in HTTP to get through a firewall), you need to add TunnelingEnabled="true" into your &lr;ver> definition in the config.xml file or check the appropriate box on the console. Then use a URL like http://localhost:7001 instead of t3://localhost:7001 for Context.PROVIDER_URL when getting your InitialContext. If you want HTTP tunneling with SSL, use https://localhost:7002 (where https uses HTTP tunneling with SSL and 7002 is the secure port that you configured). You will pay a performance penalty for doing this, so only use tunneling it if you really need to (i.e., need to go through a firewall).

The MaxPostTimeSecs attribute set in the Administration console under Servers or virtual hosts section corresponds to which of the following?
a. The amount of time that WebLogic Server waits between receiving chunks of data in an HTTP POST.
b. The total amount of time that WebLogic Server spends receiving HTTP POST data.
c. The time spent by WebLogic server to post data to other servers in the cluster.
d. The number of bytes of data received in a POST from a single request.


Choice B is correct. Web servers may face denial-of-service attacks, which is usually carried out by sending huge amounts of data in an HTTP POST method. You can set three attributes in WebLogic Server that help prevent this type of attack. These attributes are set in the console, under Servers or virtual hosts. You can limit the amount of time that WebLogic Server waits between receiving chunks of data in an HTTP POST by setting the attribute PostTimeoutSecs.
The MaxPostTimeSecs attribute limits the total amount of time that WebLogic Server spends receiving post data. If this limit is triggered, a PostTimeoutException is thrown and a message is sent to the server log. MaxPostSize attribute limits the number of bytes of data received in a POST from a single request. If this limit is triggered, a MaxPostSizeExceeded exception is thrown and a message is sent to the server log.

How do I get a thread dump to help track down a problem?
Ways to get a thread dump:
* Try running this from the command line (after running the setEnv script in /bea/wlserver6.1/config/mydomain/):

java weblogic.Admin -url t3://localhost:7001 THREAD_DUMP

* On Windows, from the console window, enter Ctrl+Break.
* On UNIX, signal the server using kill -3.

2 comments:

Rithanya said...

Nice tips ... In this case we also create more details about weblogic load balancing technology . I would like to introduse more details about HCL load balancer -- More details about HCL load balancer pls look on this for key features for HCL Load balancer http://broadcast-engineers.blogspot.com/2010/09/hcl-info-load-balancer-key-features-and.html

Anonymous said...

This is a good resource. I've had a number of people ask me for questions to ask at interviews, so I'll add this to my list of resources.

I have documented the approach I use, which is quite different from the one described here.

I prefer to ask simpler questions to begin, listen, and then ask further questions to understand the extent of the candidate's knowledge.

I've posted sample questions here.

Topics