Post on 18-Aug-2020
Raastech, Inc.2201 Cooperative Way, Suite 600Herndon, VA 20171+1-703-884-2223info@raastech.com
Scale Oracle WebLogic ServerA Detailed Walkthrough
Wednesday, November 8th
Tech Track10:40 am - 11:35 amAUDITORIUM VT550
© Raastech, Inc. 2017 | All rights reserved. Slide 2 of 53@Raastech
Agenda
1. Introduction
2. Overview of Oracle WebLogic Server
3. Traditional High Availability
4. Scalability Options
5. WebLogic Domain Partitions
6. Extending to Oracle Java Cloud Service
7. Summary
© Raastech, Inc. 2017 | All rights reserved. Slide 3 of 53@Raastech
© Raastech, Inc. 2017 | All rights reserved. Slide 4 of 53@Raastech
About Us
▪ Michael Mikhailidi
▪ 20+ years Oracle experience
▪ Extensive Oracle Fusion Middleware experience
▪ Oracle SOA Certified
▪ Blogger, presenter
© Raastech, Inc. 2017 | All rights reserved. Slide 5 of 53@Raastech
About Raastech
▪ Small systems integrator founded in 2009
▪ Headquartered in the Washington DC area
▪ Specializes in Oracle Fusion Middleware
▪ Oracle Gold Partner
▪ Oracle SOA Specialized
© Raastech, Inc. 2017 | All rights reserved. Slide 6 of 53@Raastech.
© Raastech, Inc. 2017 | All rights reserved. Slide 7 of 53@Raastech
▪ Application servers (i.e., middleware) reside between the frontend and the backend
▪ The mostly (but not always) host and execute web application code and web services
▪ Oracle WebLogic Server is one such application server
Middleware
.
© Raastech, Inc. 2017 | All rights reserved. Slide 8 of 53@Raastech
Oracle WebLogic Server
▪ Acquired from BEA in 2008
▪ Industry’s leading Java Enterprise Edition (Java EE) Application server
▪ Replaced Oracle Application Server
▪ Required for almost all Oracle Fusion Middleware products
▪ Supports the deployment of many distributed applications
▪ Provides a standard set of APIs for creating distributed Java
applications that can access a wide variety of services such as
▪ JMS, JDBC, RMI, Web Services, XML, EJB etc.
.
© Raastech, Inc. 2017 | All rights reserved. Slide 9 of 53@Raastech
Current Releases
▪ Current releases:
▪ Oracle WebLogic Server 12c R2 (12.2.1)
▪ Oracle WebLogic Server 12c (12.1.2 and 12.1.3)
.
© Raastech, Inc. 2017 | All rights reserved. Slide 10 of 53@Raastech
Oracle Marketing Stuff
▪ “New features for lowering cost of operations, improving performance,
enhancing scalability”
▪ “Provides flexibility between on-premise and third-party clouds”
▪ “Increases developer productivity with mobile application
development and maven support”
▪ “Optimized for Oracle Exalogic Elastic Cloud”
▪ “Provides extreme cloud performance, scalability, and elasticity,
unmatched integration with Oracle’s Database 12c including multi-
tenant database support”
© Raastech, Inc. 2017 | All rights reserved. Slide 11 of 53@Raastech
Understanding Oracle Fusion Middleware
▪ “Oracle Fusion Middleware” is a misleading term
▪ Used to describe middleware products such as:
▪ Business Intelligence (e.g., OBIEE)
▪ Integration (e.g., SOA Suite, OSB)
▪ WebCenter (e.g., WebCenter Content and Portal)
▪ Identity Management (e.g., Oracle Access Manager)
▪ Monitoring (e.g., OEM Cloud Control)
▪ But many times used to describe a single product:
▪ WebLogic Server
© Raastech, Inc. 2017 | All rights reserved. Slide 12 of 53@Raastech
▪ WebLogic Server is the core foundation of all Oracle Fusion
Middleware products (and applications)
WebLogic Server: Foundation for Fusion Middleware
© Raastech, Inc. 2017 | All rights reserved. Slide 13 of 53@Raastech
© Raastech, Inc. 2017 | All rights reserved. Slide 14 of 53@Raastech
WebLogic Server High Availability
▪ Typically fronted by WebTier/OHS/Apache (but with with the newer
versions you can use web sockets)
▪ Requires shared filesystem (or database) for setting up highly
available clusters
WebLogic Server WebLogic Server WebLogic Server
Shared File System
WebTier WebTier WebTier
Single AdminServer to administer entire
cluster Node Manager runs on every
server
Hardware load balancer
© Raastech, Inc. 2017 | All rights reserved. Slide 15 of 53@Raastech
WebLogic
WebLogic Server High Availability
AdminServer
WebTier
WebLogic
WebTier
BookingApp BookingApp
OHS OHS
Load Balancer
© Raastech, Inc. 2017 | All rights reserved. Slide 16 of 53@Raastech
Cluster
▪ A cluster is a group of Managed Servers running simultaneously
✓ Scalability through parallelism
✓ Reliability/Availability through replication and redundancy
▪ A cluster is part of a single domain and each domain can contain multiple clusters
▪ A cluster appears as a single instance to most clients
▪ Clusters enable some advanced features, such as Whole Server Migration, Service Migration, and clustered JMS destinations
© Raastech, Inc. 2017 | All rights reserved. Slide 17 of 53@Raastech
Load Balancing in a Cluster
▪ For JSPs and Servlets: load balancing is external
▪ Web server proxy plug-in (round robin)
▪ HTTP Proxy servlet (i.e., using WLS as a load balancer)
▪ 3rd party hardware or software load balancer (F5 Big IP LTM or Cisco CSM)
▪ EJBs and RMI Objects: load balancing is done at connection
▪ Objects are cluster-aware
▪ Load balancing algorithm is stored in the clustered object’s stub
▪ Objects are available on all cluster members; remote objects connect/use according the LB algorithm in the stub
▪ Load balancing algorithms: round robin, weighted, random, server affinity
© Raastech, Inc. 2017 | All rights reserved. Slide 18 of 53@Raastech
Failover in a Cluster
▪ Servlets and JSPs:
▪ HTTP session state is replicated to a secondary server in the cluster
or to a database
▪ EJBs and RMI Objects:
▪ Replicas available throughout the cluster
▪ Exceptions caught and retried on another instance
▪ For Stateful Session Beans, state is replicated on a secondary server
© Raastech, Inc. 2017 | All rights reserved. Slide 19 of 53@Raastech.
© Raastech, Inc. 2017 | All rights reserved. Slide 20 of 53@Raastech
WebLogic
Scale Vertically
AdminServer
WebTier
Load Balancer
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
.
© Raastech, Inc. 2017 | All rights reserved. Slide 21 of 53@Raastech
WebLogic
Scale Vertically
AdminServer
WebTier
Load Balancer
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
WebLogic
AdminServer
WebTier
Load Balancer
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
© Raastech, Inc. 2017 | All rights reserved. Slide 22 of 53@Raastech
Scale Vertically
▪ The easiest from a WebLogic Server standpoint
▪ Virtualization tools make this so much easier today
▪ Simply increase hardware capacity
▪ May require rolling restarts if Managed Server configuration is
updated
▪ Does not increase availability
▪ Zero downtime expected
.
© Raastech, Inc. 2017 | All rights reserved. Slide 23 of 53@Raastech
WebLogic
Scale Horizontally
AdminServer
WebTier
Load Balancer
WebLogic
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
BookingApp
OHS
.
© Raastech, Inc. 2017 | All rights reserved. Slide 24 of 53@Raastech
Scale Horizontally
▪ Easily doable, but requires reconfiguration.
▪ Coarse-grained steps are:
1. Add new host(-s) to hardware load balancer
2. Reconfigure WebLogic domain
1. Add new machine(-s)
2. Add new managed server(-s)
3. Update cluster configuration
3. Update OHS configuration
No Restarts!
No Restarts?
.
© Raastech, Inc. 2017 | All rights reserved. Slide 25 of 53@Raastech
Scale Horizontally - Easy
1. Locate OHS instance in FMW Control
2. You have two options:
a. Set Dynamic Cluster List to ON
b. Specify Cluster address manually
3. Save configuration
4. Restart OHS instance
a. May not be needed if you have Dynamic Cluster List enabled
b. Required if you prefer to maintain cluster list manually
5. Repeat for steps 1-4 for all nodes
.
© Raastech, Inc. 2017 | All rights reserved. Slide 26 of 53@Raastech
Scale Horizontally – The Unix Way
1. Connect to the server console where OHS is installed
2. Go to the OHS configuration folder
a. 12c - $DOMAIN_HOME/config/fmwconfig/components/OHS/instances/instanceName/moduleconf11g - $INSTANCE_HOME/config/OHS/ohs1/moduleconf
b. Update any configuration in mod_wl_ohs.conf (or equivalent)
<Location /integration>SetHandler weblogic-handlerWebLogicCluster soahost1:8001,soahost2:8001,soahost3:8001DynamicServerList ONWLProxySSL ONWLProxySSLPassThrough ON
</Location>
c. Save file
d. Copy file to the nodes, within the cluster (with the same purpose)
3. Bounce OHS instances one by one
.
© Raastech, Inc. 2017 | All rights reserved. Slide 27 of 53@Raastech
Dynamic Cluster
▪ Supported in Oracle WebLogic 12.2.1
▪ Can be done via console, WLST, REST, policy/action, scheduled
1. Create dynamic cluster
2. Specify the number of server instances at peak load
3. (WebLogic creates the specified number of server instances and apply the calculated attribute values to each one)
4. Start a server instance without having to first manually configure it and add it to the cluster
© Raastech, Inc. 2017 | All rights reserved. Slide 28 of 53@Raastech
Scale Horizontally
DynamicServerList WebLogicServer vs. WebLogicCluster
Hardware LBRHardware LBR
WebLogic
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
WebLogic
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
WebLogicServer…DynamicServerList OFF
WebLogicCluster…DynamicServerList ON
© Raastech, Inc. 2017 | All rights reserved. Slide 29 of 53@Raastech
WebLogic
Convert DR to Stretch Cluster
AdminServer
WebTier
Load Balancer
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
WebLogic
AdminServer
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
Active SiteData Center #1
Passive SiteData Center #2
© Raastech, Inc. 2017 | All rights reserved. Slide 30 of 53@Raastech
WebLogic
WebTier
WebLogic
WebTier
WebLogic
Convert DR to Stretch Cluster
AdminServer
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
Data Center #1 Data Center #2
Load Balancer
OHSOHS
BookingAppBookingApp
© Raastech, Inc. 2017 | All rights reserved. Slide 31 of 53@Raastech
Convert DR to Stretch Cluster
▪ Easily doable, but requires reconfiguration
▪ Network latency between data centers should be < 5 ms (max 10 ms)
▪ Rolling bounces eventually required
▪ Consider optimizing HTTP session replication settings
▪ In addition, the weblogic.xml file in the application must include the
following to support HTTP session replication:
<wls:session-descriptor>
<wls:persistent-store-type>replicated</wls:persistent-store-type>
</wls:session-descriptor>
© Raastech, Inc. 2017 | All rights reserved. Slide 32 of 53@Raastech
Convert DR to Stretch Cluster
▪ HTTP session replication across data centers may cause serious
performance degradation in the system
▪ Oracle recommends defining two different replication groups (one
for each site) to minimize the possibility of replication happening
across the two sitesData Center #1
MS1 MS2
Data Center #2
MS3 MS4
RepGroupDC1
RepGroupDC1 (secondary)RepGroupDC2 (secondary)
RepGroupDC2
© Raastech, Inc. 2017 | All rights reserved. Slide 33 of 53@Raastech
Leverage DR, but get creative
Data Center #1 Data Center #2
Load Balancer
WebLogic
AdminServer
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
WebLogic
AdminServer
WebTier
WebLogic
WebTier
BookingApp
OHS
BookingApp
OHS
© Raastech, Inc. 2017 | All rights reserved. Slide 34 of 53@Raastech
Leverage DR, but get creative
▪ 2 separate WebLogic Server clusters, completely independent
▪ Same backend database
▪ Additionally protects against cluster-level failures
▪ Locally persisted JMS messages cannot failover to other data center
© Raastech, Inc. 2017 | All rights reserved. Slide 35 of 53@Raastech.
© Raastech, Inc. 2017 | All rights reserved. Slide 36 of 53@Raastech
Introducing WebLogic Domain Partitions
▪ New to Oracle WebLogic Server 12.2.1
▪ Think virtualization or multitenancy in WebLogic Server, similar to
pluggable databases in the Oracle Database
▪ Every domain can have 1 or more partitions, each containing its own
apps and resources
.
© Raastech, Inc. 2017 | All rights reserved. Slide 37 of 53@Raastech
Introducing WebLogic Domain Partitions
WebLogic Domain APP
AdminServer
BookingApp
WebLogic Domain ORD
AdminServer
OrderMgmt
WebLogic Domain NEW
AdminServer
OrderReports
JMS JDBC
JMS JDBC
Partition APP
BookingApp
JMS JDBC
Partition ORD
OrderMgmt
OrderReports
JMS JDBC
.
© Raastech, Inc. 2017 | All rights reserved. Slide 38 of 53@Raastech
Thoughts on WebLogic Partitions
▪ Is it really needed?
▪ Would you prefer 2 domains –or– 1 domain with 2 partitions?
▪ Patching considerations (must upgrade both apps simultaneously)
▪ Segregation considerations (not performance, but rather binaries)
© Raastech, Inc. 2017 | All rights reserved. Slide 39 of 53@Raastech
Export a Domain
▪ Run the command to export the domain
exportDomainForPartition.sh /tmp /u01/mw/user_projects/domains/raastech
▪ Output is:
raastech-attributes.json
raastech.zip
© Raastech, Inc. 2017 | All rights reserved. Slide 40 of 53@Raastech
Import a Domain to a Partition
▪ Run the command to import the domain to a partition:
$MW_HOME/oracle_common/common/bin/wlst.sh
connect('weblogic', 'welcome1', 'http://newhost:7001');
importPartition('/tmp/raastech.zip', 'raastech', true, none);
startPartitionWait(cmo.lookupPartition("raastech"));
© Raastech, Inc. 2017 | All rights reserved. Slide 41 of 53@Raastech
Confirm Application
▪ Application URL on old domain:
http://devhost:8001/BookingApp
▪ Application URL on new domain partition:
http://devhost:8001/raastech/BookingApp
© Raastech, Inc. 2017 | All rights reserved. Slide 42 of 53@Raastech
Good Stuff
▪ Consolidation of environments
▪ Consolidate smaller or less used apps into a single environment
▪ Replication of environments
▪ Quickly provision replicas of test environments
© Raastech, Inc. 2017 | All rights reserved. Slide 43 of 53@Raastech
© Raastech, Inc. 2017 | All rights reserved. Slide 44 of 53@Raastech
Introducing the Oracle Java Cloud Service (JCS)
▪ Simply WebLogic Server on the cloud
▪ Requires the Oracle Database Cloud Service
© Raastech, Inc. 2017 | All rights reserved. Slide 45 of 53@Raastech
Migrating to Oracle JCS
1. Migrate the Database
2. Configure the Oracle JCS Environment
3. Migrate the Application
© Raastech, Inc. 2017 | All rights reserved. Slide 46 of 53@Raastech
Configure the Oracle JCS Environment
1. Navigate to the Oracle JCS Console
2. Launch the AdminConsole
3. Create data sources, work managers, messaging resources,
cluster, etc.
.
© Raastech, Inc. 2017 | All rights reserved. Slide 47 of 53@Raastech
AppToCloud Healthcheck
▪ Validates on-premise domain and applications prior to moving them to
Oracle JCS
a2c-healthcheck.sh -oh /u01/app/fmw -adminUrl
t3://devhost:7001 -adminUser weblogic -outputDir /tmp
.
© Raastech, Inc. 2017 | All rights reserved. Slide 48 of 53@Raastech
AppToCloud Export
▪ Exports on-premise domain and applications in preparation to move
them to the Oracle JCS storage container
a2c-export.sh -oh /u01/app/fmw -domainDir
/u01/mw/user_projects/domain/raastech -archiveFile
raastech.zip -cloudStorageContainer Storage-
MyAccount/MyContainer -cloudStorageUser myuser
.
© Raastech, Inc. 2017 | All rights reserved. Slide 49 of 53@Raastech
AppToCloud Import
▪ Create an Oracle JCS instance with AppToCloud
1. Click Create Service
2. Select Java Cloud Service – AppToCloud
▪ Import application to service instance
1. Click AppToCloud Import
.
© Raastech, Inc. 2017 | All rights reserved. Slide 50 of 53@Raastech
© Raastech, Inc. 2017 | All rights reserved. Slide 51 of 53@Raastech
Recap
▪ Vertical scaling
▪ Horizontal scaling
▪ Stretch cluster across data centers
▪ Independent active-active domains across data centers
▪ WebLogic domain partitions
▪ Oracle JCS
© Raastech, Inc. 2017 | All rights reserved. Slide 52 of 53@Raastech
Cool Links
▪ Migrating a Java EE Application to Oracle Java Cloud Service (tutorial)
http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/javaservice/JCS/jcs_migration/jcs_migration.html
▪ WebLogic Server 12.2.1 – Converting Domains to Partitions (video)
https://www.youtube.com/watch?v=D1vQJrFfz9Q&t=23s
▪ Checking the Health of an On-Premise WebLogic Domain
https://docs.oracle.com/en/cloud/paas/java-cloud/jscug/checking-health-premises-weblogic-domain.html
▪ Oracle Java Cloud Service – AppToCloud Tooling
http://www.oracle.com/technetwork/topics/cloud/downloads/java-cloud-apptocloud-3042466.html
© Raastech, Inc. 2017 | All rights reserved. Slide 53 of 53@Raastech
Q&A