AWS Cloud Operations & Migrations Blog

Modernizing WebLogic application to Cloud Native on AWS (Part 1)

Background

In a typical 3-tier application architecture, WebLogic is an application server that runs on a middle tier between back-end databases and browser-based clients. WebLogic allows users to develop and deploy an application that has business logic and allows the application to access other services like database, messaging, or other enterprise systems.

Many customers still have their applications deployed on Oracle WebLogic and want to modernize it to leverage benefits of modern application. The biggest blocker they face is how and where to start their modernization journey.

In this blog post I will cover how and where to start modernization WebLogic Monolith application into an AWS cloud native application taking advantages of the AWS managed services.

Migration Strategy

Of the 7 migration/modernization strategies, I will focus on Refactor. But let’s briefly touch upon other migration strategies for WebLogic. Assuming the workload running on WebLogic is important to the business, Retire is not an option. Since WebLogic is a monolith application and many times an old version with an unsupported Java version is running, Retaining it can be a security issue and the benefits of a modern applications cannot leveraged. Repurchase can be considered if there is a similar application available that can replace the WebLogic application with minimal effort and can get advantages of modern architecture. Also consider cost of the new system, and maintenance.

7 Strategies for Migrating Applications to the Cloud

Figure 1: Seven Strategies for Migrating Applications to the Cloud

Rehost has disadvantages of a monolithic application. But rehost can be the first step in the modernization journey. Once you rehost the application in AWS cloud, refactoring becomes much easier. You have access to tools in AWS that can accelerate the refactoring process. AWS has tools like AWS Application Migration Service that can rehost applications at scale.

Another option is Replatform. You can create docker image of the WebLogic Server and deploy the container into AWS. This is not much different from the rehost. You get the docker benefits out of it but it is the same application inside.

Architecture

WebLogic Application Server can host a wide variety of applications that are compatible with the Java EE specifications like Servlets, Enterprise JavaBeans (EJB), Java Server Pages (JSP). It provides various features to the applications it hosts like transaction management, resource pooling (Database connections, threads, work managers etc.), connection sharing, queueing, pub/sub architecture, multi-tenant architecture. Below is a high level block diagram of WebLogic Server:

Oracle WebLogic Server Block Diagram

Figure 2: Oracle WebLogic Server Block Diagram (Source: Oracle WebLogic Documentation)

In order to simplify and move to Cloud native services for the features WebLogic provides at a high level, I broke the above block diagram into small components, and marked with dotted boxes:

Oracle WebLogic Server Block Diagram broken into smaller components

Figure 3: Oracle WebLogic Server Block Diagram broken into smaller components

Let’s take each of the pieces in above diagram one by one:

  1. The Web-tier: The Web-tier of WebLogic has few components like Load Balancer Router (LBR). WebLogic Server tries to balance the workload evenly among the cluster instances. Load balancing works for RMI objects and EJBs and similarly for servlets and JSPs for the most part.
    On AWS, Elastic Load Balancer can be used to achieve similar functionality. There are few options like Application Load balancer, Network Load balancer, can be chosen based on customer use case.
    The Oracle Web Cache can be used as a reverse proxy and a compression engine deployed between the client browser and HTTP Server. There is also an HTTP Server which is part of the Web-tier.If your application using RESTful APIs or WebSocket APIs, you can use Amazon API Gateway. API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the “front door” for applications to access data, business logic, or functionality from your backend services. The backend functionality can be implemented in AWS Lambda, or hosted on Amazon EC2. The static contents can be hosted on Amazon S3.
    AWS offers Web Caching solution that provides multiple options including Amazon CloudFront, Amazon ElastiCache, amongst others.

    If you are using WebLogic for webhosting, which is not a common case, then you can use webhosting solutions available on AWS starting from Amazon Lightsail that is meant for simple websites. AWS Amplify provides a complete workflow for developing, deploying, and hosting single page web apps or static sites with serverless backends.

    AWS Services:

  2.  

  3. Scripting Tools: WebLogic has WebLogic Scripting Tool (WLST) scripting tool that can be used to manage the configuration of an active WebLogic domain, view performance data, security management, access cluster, application deployment, applying same configuration settings, iteratively, across multiple nodes in the topology.On AWS you have several options for scripting. For example,  AWS Cloud Development Kit (AWS CDK) can be used to define the cloud application resources,  AWS Serverless Application Model (AWS SAM) is an open-source framework for building serverless applications, and for Infrastructure-as-code (IaC), AWS CloudFormation enables  you to model, provision, and manage AWS and third-party resources.
    For configuration management, you can use  AWS Config that can be used to continually assess, audit and evaluate configurations and relationships of your resources in AWS.

    AWS Services:

  4.  

  5. Administrator Console: WebLogic Admin console provides a user interface to configure, start, and stop WebLogic Server instances. It can be used to configure WebLogic server instances, such as database connectivity, messaging, configure security parameters, etc.
    AWS provides AWS Management console that provides everything you need to access and manage the AWS cloud.

    AWS Services:

  6.  

  7. Identity and Security Management: WebLogic has a comprehensive and standards-based design and provides directory services, identity management provisioning using Oracle IM, access control, integration with AD and other providers, keystores, and certificate registry.
    AWS provides these services in several flavors and services. Amazon Cognito can be used to implement secure, easy, scalable customer identity and access management. It provides several advance features like integration with SSO, federated sign-in. With AWS Identity and Access Management (IAM) you can specify who or what can access services and resources in AWS, centrally manage fine-grained permissions, and analyze access to refine permissions across AWS. With AWS Certificate Manager (ACM), you can manage various SSL certificates. Similar to WebLogic key management (vault), AWS provides AWS Secrets Manager to manage, retrieve, and rotate database credentials, application credentials, OAuth tokens, API keys, and other secrets.

    AWS Services:

  8.  

  9. Message Queuing: As WebLogic is a monolith, it provides queuing mechanism as part of the application server. It offers two different message delivery models: point-to-point and publish/subscribe. It has two delivery models: At-least-once, at-most-once. The Java Messaging Service (JMS) queues supports multiple message formats and has monitoring capabilities.AWS provides more modern options like Amazon Simple Queue Service (Amazon SQS), Amazon EventBridge, Amazon Simple Notification Service (Amazon SNS) and Amazon MQ. One or more of these can be used to achieve application decouple, notification and Event Driven Architecture.

    AWS Services:

  10.  

  11. Persistent Stores: WebLogic has two primary persistent stores: File store, database store. These can be shared by multiple subsystems, offer high performance throughput and transactional support.AWS offers a wide variety of persistent store options.Amazon Elastic File System (Amazon EFS), Amazon FSx and Amazon Elastic Block Store (Amazon EBS). Amazon EFS automatically grows and shrinks as you add and remove files with no need for management or provisioning. Amazon FSx lets you choose between four widely-used file systems: NetApp ONTAP, OpenZFS, Windows File Server, and Lustre. Amazon EBS is an easy-to-use, scalable, high-performance block-storage service designed for Amazon Elastic Compute Cloud (Amazon EC2).

    AWS Services:

  12.  

  13. Database Connection Pooling: WebLogic provides database connection pooling. Database pooling reduces the number of times new connection objects are created, promotes connection object reuse and quickens the process of getting a connection. It also reduces the amount of effort required to manually manage connection objects and minimizes number of stale connections. All these features help in minimizing the resources spent on maintaining database connections. By using Amazon RDS Proxy, you can allow your applications to pool and share database connections to improve their ability to scale. Amazon RDS Proxy makes applications more resilient to database failures by automatically connecting to a standby DB instance while preserving application connections.

    AWS Services:

  14.  

  15. Application Layer: Below are some of the features that WebLogic provides the following features when it comes to hosting an application like Enterprise JavaBeans (EBJ), Servlets, etc.:
    • Application Servers have Managed Nodes
    • Cluster Support
    • Failover Support
    • Work Managers

    For hosting applications, AWS provides Amazon Elastic Compute Cloud (EC2) where applications can be deployed under AWS Application Auto Scaling. To deploy applications with docker container, AWS has Amazon Elastic Container Service (Amazon ECS) and Amazon Elastic Kubernetes Service (Amazon EKS). There are also serverless options using AWS Fargate and AWS Lambda to deploy the applications. In addition to these, AWS also provides several other options to deploy applications easily and using modern architecture.

    AWS Services:

Quick Reference

Below is the quick reference the comparison I discussed in the blog. You would need to look at what features your application is using from WebLogic and choose equivalent features in AWS.

Feature WebLogic AWS
Load Balancer for HTTP Requests Load Balancer Router Amazon Elastic Load balancer
Web Cache Oracle Web Cache Amazon CloudFront
Amazon ElastiCache
HTTP Server Oracle HTTP Server Amazon Elastic Load Balancer (Application Load Balancer, Network Load Balancer, Gateway Load Balancer)
Amazon API Gateway
AWS Lambda
Amazon EC2
Amazon S3
Amazon Lightsail
AWS Amplify
Scripting Tools WLST AWS Cloud Development Kit
AWS Serverless Application Model
AWS CloudFormation
AWS Config
Administrator Console WebLogic Admin Console AWS Management Console
Identity and Security Management WebLogic Identity Management Amazon Cognito
AWS Identity and Access management
AWS Certificate Manager
AWS CloudHSM
AWS Directory Service
AWS Secrets Manager
Queuing Features JMS Queues Amazon SQS
Amazon SNS
Amazon MQ
Amazon EventBridge
Cluster Support Managed Servers
Node Manager
Amazon ECS
Amazon EKS
AWS Application Auto Scaling
AWS Lambda
Amazon Fargate
Database Connection Pooling WebLogic Database Connection Pooling Amazon RDS Proxy
Persistent Stores File Stores
Database Stores
Amazon Elastic File System
Amazon FSx
Amazon Elastic Block Store

Since your application might not be using all the WebLogic features that I covered in this blog, you will use only a subset of the AWS services listed above.

Let’s take an example of an application deployed in WebLogic as EJB that exposes REST API’s. If you want to modernize this application, you would replace the web-tier with an API Gateway and Application Load Balancer. The application logic implemented in EJB can be moved to ECS or lambda. Many applications also use monolithic database. On AWS you use purpose-built databases based on the use case. You can explore using no-sql Database like DynamoDB, object store like Amazon S3 or go with relational database like Amazon Aurora.

Adding it all together, you get an equivalent AWS cloud native architecture, like the one below.

Sample Cloud-native Architecture

Figure 4: Sample Cloud-native Architecture

Conclusion

In conclusion, the journey from WebLogic to cloud modernization represents a significant leap forward for businesses seeking to thrive in today’s fast-paced digital landscape. We’ve explored the various pathways and opportunities associated with this transformation, from the complex features of legacy systems to the flexibility and scalability offered by cloud platforms.

As organizations increasingly recognize the need for agility and innovation, migrating from WebLogic to the cloud emerges as a strategic imperative. This modernization effort can unlock a world of possibilities, enabling improved resource management, reduced operational costs, and the ability to respond swiftly to evolving market demands. However, it’s essential that you approach this transformation with careful planning, a clear strategy, and the right tools and expertise.

In the next part of this blog post, I will cover strategies, tools and mechanisms that can be used to accelerate the modernization.

Saurabh Sharma

Saurabh Sharma, Senior Modernization Solutions Architect at Amazon Web Services, specializes in application modernization. With a focus on transitioning from monoliths to microservices, implementing domain-driven design, and optimizing applications using AWS cloud-native services, he provides strategic insights to enhance scalability and resilience.