WebLogic‎ > ‎

Best WebLogic Platform Design

Best practices in WebLogic Domain Configurations

Intro to Infrastructure Design

The infrastructure design goal to setup a platform that will be serve the customer needs. This platform designing you can do when you clear idea about what business requirement and how much business is expecting network traffic through internal, external, third-party tie-ups.

Secure implementation Entire platform treated as box, that need to given access through single point of entry. This entry should protect the secure data and allow user only that authenticated to view. This is all about DNS filtering, caching, HTTP/HTTPS traffic controlling at the global load balancer level.

Handle the bandwidth: In this the traffic management will be Local level. This is could be handled with a cluster of Traffic managers. This level also web projects are going to manage sessions with the end users need the caching in this level too.

Serve the business required components: This is where the Application team provided/suggested components will be deployed to serve the customer required functionality. Here the Middleware layer take the role and it may need UCM, E-Biz, SOA suite or WebCenter components or any Fusion Middleware component. The base is WebLogic platform. So we must configure with all possible standards implemented and Oracle recommendations with respect to the chosen version compatibility certificate of matrix provided in Oracle site.

Every platform the data transact between web client and reach to the end point either to a file or to a database table. Disk crash should not impact the end-user at any time. Here maintaining redundant data is the strategy for data layer failover. Oracle providing best possible strategies for replicating the data and keep available by its cluster strategy RAC.

Failover strategies every aspect This is where real architecture story starts when you prepare and build a platform, you should come up with challenging that 'come on break this setup of my platform'. Try all possible failures for every component that is part of the platform.

Disaster Recovery plan
This is usually refered for every big e-commerce running site running basic requirement. It should simulate the production environment. The DR setup is that it will be protect data and business from any unusual calamities incurs. 

Estimation of plan execution The platform designer must have clarity about every aspect of each stage that could takes place in the building platform setup. Predominantly estimation plan for system resources, the number of expertise who can bring the platform build with in the estimated time. This is also depends on the availability of both system resources, man power.

Dedicated User and Group

The WebLogic domain directories would have to be owned by the respective application users. The logs generated by this middleware user must be in such group that could give the accessability to other users who need to access the logs for monitoring.

File System and mounts

This is crutial role while deploying the new environment from the scratch. You need to define separate mount points for 
  • WebLogic domain configurations 
  • WebLogic Server Output logs, Access loggs or application specific logs
  • Application deployment codes and properties
  • Softwares that related to the Projects
The dedicated mount points will avoid unnecessary memory issues such as  Piling up of log files leads to Disk full problems. Frequent archive and cleanup of long stored logs will free up the disk space. Best option is to maintain the automation scripts for this house cleaning process. While making this automation script you need to select best archiving among gzip, tar, cpio etc that should suitable to your operating environment.

The Directory Structure need to build to follow for specific purposes

Directory

Purpose of the directory

/opt/oracle11g/10.3.6

It is installation  Home directory where we can have WebLogic, it’s components

/app/<domain>/upload

This directory will hold all the application deployments it could be .war or .ear files

/logs/<domain>

This directory will hold the WebLogic server instance logs and the domain log.  It can be dedicated for JVM stdout logs as well as the garbage collection log.

/logs/<domain>/<application>

This will hold the application specific logs that generated with log4j.properties and logger.

Installation of Java

This installation is the initial step to start your platform building. Which version of Java (JDK) is suitable for Which WebLogic you can find that in the Oracle provided Certification matrix of each version. Identify what arguments we can pass while installation of Java and what need to  check to confirm that your desired JDK installed. Keeping them into a simple automation script that can be useful when you move for multiple machine installations of JDK. 

Java's DNS Cache for WebLogic

The web applications those are deployed on WebLogic handles multiple user requests. Once an application has performed network access (i.e. urlconnection, parsing of xml document with external references, etc), the DNS settings get cached so any subsequent operation will use the old settings even if the real settings have changed. To reset everything either the application server has to be restarted as the default JVM setting is to cache forever. 

Caching can be disabled by using either networkaddress.cache.ttl  or sun.net.inetaddr.ttl  parameter depending on JVM version Sun JDK 1.5 recommends using “networkaddress.cache.ttl” parameter.  Cache can be disabled by updating the following property in $JAVA_HOME/jre/lib/security/java.security

networkaddress.cache.ttl=0

The default commented and its value set as networkaddress.cache.ttl=-1  in JDK 1.6. Specified in java.security to indicate the caching policy for successful name lookups from the name service. The value is specified as as integer to indicate the number of seconds to cache the successful lookup.

Best References:

Installation of WebLogic 11g/12c

The installation of WebLogic 11g we must choose the version and then mode of installation. Usually the initial installation setup could be done using manual and console mode, later for moving to development environment, QA environment we can go-ahaed with Silent mode installations because the number of machines required for that environment are going to increases.It is obvious that we need to choose wise way out as Silent mode installation.

WebLogic Domain Templating

Initially we can do one setup of the complete platform that can be tested all the test cases, that implementation of all the application components, system resources such as JDBC, JMS, deployments of depending libraries then we can go for templatising the domain, that could reduce the tremendous amount of time and work load of infrastructure build team work. The WebLogic domain templating can be done in many ways the following ways:
2. Using config_builder.sh requires X11 forwarding for UNIX systems

Oracle Fusion Middleware layout

Overview diagram for WebLogic Platform architecture implementation for Fusion middleware products deployments.

Cluster

When you started architecture the Clustered environment for your domain, ensure that each configurable resources such as domain, server, clusters, machine, JDBC datasource etc in your WebLogic Server environment has a unique name.
Configure the multicast address and port for the cluster that will NOT be used by any other cluster or external applications that also use multicast communications while the WebLogic Cluster is active. Some of the environments uses unicast address then not much to worry!
Choose best suitable Cluster strategy 
Multi site web cluster
Multi web proxy cluster


JVM Parameters for WebLogic

This JAVA Parameters are the predominent factor of your WebLogic server  performance. So we need to do this changes when we know right reason for tune the. This Java Parameters can be classified to three parts: JVM Memory arguments, Java options -- logging included here, GC algorithm related parameters. If you are configuring a Fusion SOA suite or WebCenter Portal or you might be using Fatwire on WebLogic managed servers you might need the setting for JVM arguments. Following are the check list for best settings for Administrator servers as well as Managed servers. These you can setup in your domains start wrapper scripts.

 

CLASSPATH

To run the WebLogic application server we don't need anything but for application build and deployment might requires the dependent libraries and java packages in the CLASSPATH. Where major packages or libraries are :
  • JDBC driver
  • WebLogic PATCHES
  • PRE_CLASSPATH and POST_CLASSPATH

JDBC Driver

If we are using Thin driver we don't need any JDBC Driver in the CLASSPATH while compiling otherwise library PATH should include file ojdbc6.jar is available under {WL_HOME}/server/lib directory. This could be required for development environments where build refers it.

If you found any issues during the application testing then better to download a latest version is required then it would be available from on Oracle archives.

WebLogic Patches

Patch management will prevent you to unneccessary issues. Using enterprise manager or patch update tool we can verify the Oracle WebLogic patch availability and it should be installed under/opt/Oracle11g/10.3.6/patches directory PATH.

PRE_CLASSPATH and POST_CLASSPATH

When you need some of the classes required in run-time for reference or they need to load into server we must include them according to priority before weblogic.jar into PRE_CLASSPATH and the libraries need to included after can be keep in the POST_CLASSPATH. More wise way and best practice is to setup libraries into the CLASSPATH by creating dedicated repository directories for PRE and POST with respect to application needs.

MEMORY ARGUMENTS

This arguments can be passed to a WebLogic managed server in startWebLogic.sh or startManagedWebLogic.sh with system defined as MEM_ARGS but we can define customized memory arguments with USER_MEM_ARGS in the setDomainEnv.sh. The best practice is to maintain this USER_MEM_ARGS into the start wrapper script will be more feasible and reusable for all the managed servers on the same machine it is a generic and templatized flexibility.

JVM parameter

Default

Ideal Parameters

Recommandation/Description

-Xms

NA

256m for admin server
2048m for managed servers

The Managed Servers size can be differ according to your components deployed on it and for which environment you are using

-Xmx

NA

256m for admin server
2048m for managed servers

. Sets the maximum heap size for the JVM. To improve performance and memory management set this value to be the same as -Xms

-Xmn

NA

256m for admin server
800m for managed servers

Young Generation size for efficient garbage collection -Xmn value should be lower than the -Xmx value

-Xss

NA

512K

size of the stack.

XX:+AggressiveHeap

NA

Set this parameter

Setting the minimum heap size (-Xms) equal to the maximum heap size (-Xmx) to minimize garbage collections.

XX:ParallelGCThreads

NA

20

Specifies the number of threads used in parallel garbage collection

XX:+UseParallelGC

NA

Set this parameter

Sun recommends Parallel GC as default you can change as per your application need. Mostly CMS is commonly used with WebLogic

XX:LargePageSizeInBytes

 

4M

By using this parameter we can get the best efficiency out of the memory management system of our server

XX:MaxTenuringThreshold

NA

3

option specifies how many collections an object can remain in the young generation, after which it is promoted to the old generation

XX=PermSize

32m

256M

Minimum size of permanent generation heap space. Optimally, set equal to MaxPermSize to avoid heap having to be adjusted when permanent area grows.

XX=MaxPermSize

128m

256M

Changed as 256MB is not sufficient due to class loader issues during re-deployment

-XX:SurvivorRatio

NA

20

The New generation area is divided into three sub-areas: Eden, and two survivor spaces that are equal in size. Use the -XX:SurvivorRatio=X option to configure the ratio of the Eden/survivor space size.

l GC algorithms

Java Options

Properties file 
Passing the Named values at the time of running the java command.

Initial Tuning parameters

Accept Backlog 

You can tune the number of connection requests that a WebLogic Server instance will accept before refusing additional requests. The Accept Backlog parameter specifies how many Transmission Control Protocol (TCP) connections can be buffered in a wait queue. This fixed-size queue is populated with requests for connections that the TCP stack has received, but the application has not accepted yet.

Best value sugest as 65 in regular web applications it can be changed as per the needs.
Referance:

set HTTP server logging format

All Managed servers where access logs are enabled should have its format set to Extended instead of common. 
Access logs file should have following format defined in the access log files so that extended logging performs logging based on this format. 

#Version: 1.0
#Fields: c-ip  date time c-dns cs-method sc-status time-taken bytes cs-uri cs(Referer)   
#Software: WebLogic

References:


File Descriptors on UNIX machines

Oracle Fusion Middleware platform build on WebLogic based, we need to have sufficient file descriptors. We can set to some of the Solaris machines or Linux machines as follows:

fs.file.max=65535

WebLogic WorkManager

By looking at WebLogic 9.2 to 11g environments, Optimally 25-30 JVM threads has yielded a good compromise on CPU, Context Switching and Throughput performance is OK; To find the acqurate thread numbers it must be proven under performance load test. Within WebLogic 11g, there are additional options for optimising workloads, previously thread pools (-Dweblogic.Use81StyleExecuteQueues=true) would have been used to associate thread resources to the execution of transactions within applications. 

Admin Console

The correct process to initiate a configuration change using the Administration console  obtain the lock on the current configuration, make changes and then click the Save button, every thing fine and changed successfully go ahead for updating next changes if all done then click on Activate changes. 

In the console for each managed server and cluster we need to enable Server -->Configuration-->General  Go to the bottom Advance section by lock and tick the checkbox as shown below: 
WebLogic Plug-in Enabled


We must configure additional users for monitoring each domain we configured for an application. Dedicated Administrators must be configured to do the regular maintenance jobs. 

If the NodeManager is defined in your application scope it is very much required for low scale clustered environments. Managed servers can be controlled from Admin Console.




Deployment

In development environments, mostly you need a choice for interactive deployment sessions when you do not know the exact names of target servers. This kind of situation arises when it is commonly shared among many users and different machines involved in the domain. Such situation better to use Weblogic Administration Console. Stand-alone Admin server domains can be used for development that time you choose auto-deployment for your web application, copy your application to /auto-deploy folder under AdminServer folder and create a flag file REDEPLOY. Creating a REDEPLOY flag file in the applications exploded directory if the time stamp on the file changes the AdminServer sense that and redeploy that application. Never try auto-deployment in your production environments, because it is not supported. Application remained as deployed state but that cannot serve the requests.

Oracle Fusion Middleware have various components to deploy to serve different purposes, such as WebCenter Sites it is going to have Content Server component as cs, Content Authorization Service CAS, Satellite Server for web caching this also comes as SS as web application. If your components related enterprise content management then UCM, SOA, BAM service can be deployed to dedicated managed servers. When managing the applications in production, deploy applications and modules in an archive format (.ear, .war, .jar etc.,). 

When exporting an applications deployment configuration  use weblogic.PlanGenerator only for exporting resource dependencies. Use the Administration Console to add individual tuning property values to deployment plan or to validate a custom deployment plan.

Manage multiple environments such as ST, QA, Staging and production multiple deployment configurations using deployment plans, rather than having multiple builds versions of the WebLogic server deployment descriptor (DD files).

Best Practices in Deployment

Application can be deployed to clusters in large size (i.e. number of managed servers) and to reduce the amount of file copying being undertaken either by the Admin server or by deployment tools that you use. The nostage deployment mode provides the capability of centralizing the web-app directories. With nostage deployments of exploded archive directories, WebLogic Server automatically detects changes to a deployment's JSPs or Servlets and refreshes the deployment.

 A shared  NAS Volume will be used to present the applications to multiple machines in the cluster. In nostage mode, the Administration Server does not copy the archive files from their source location. Instead, each target server must access the archive files from a single source directory for deployment. The staging directory of target servers is ignored for nostage deployments.

By using nostage deployment mode we are able to reduce complexity, reduces the time it takes to doe a deployment in a cluster and also ensures that the build process from engineering delivers 1 WAR to the production environment.

The choices of “stage” has been omitted on the basis of the admin server copying the deployment to a large cluster and “external_stage” on the basis of replicating the same application multiple times during the deployment and in this case if there is a physical machine downtime for a prolonged period and there are software releases in between, additional tasks are required to bring the external_stage directory on that host into step before starting any managed servers on that node (otherwise we could end up with an inconsistent deployment version on a given host).


Reference

 1.      Oracle document for "Best practices for deploying Applications" 

Review https://sites.google.com/site/weblogicadminsite/Home on alexa.com
WebLogic Books
Oracle WebCenter Content server
 
Oracle SOA Suite Admin
Recommendations

Java Network IO



System Performance

Network Monitoring
protect from Hackers

Firewalls and VPN


SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
Comments