Container-based application design - AWS Prescriptive Guidance

Container-based application design

Java EE replatforming challenges

You can face the following challenges when you migrate your Java EE application to a containerized platform in the AWS Cloud:

  • Disposability – To keep a container "stateless," you might have to store session state in an external database. Container-based applications require a faster, smaller application runtime, and your Java EE application server might not be able to run in the container environment.

  • Container platform compatibility – You might have to reduce application runtime-specific capabilities, such as clustering, application deployment, and memory replications.

  • Portability – Container-based applications are deployed by using an application runtime, while traditional Java EE applications are deployed by using application packages (.jar or .war files).

Best practices for container-based application design

We recommend that you follow these best practices when you design your container-based Java EE applications for the AWS Cloud:

  • Avoid making changes to your container instance after you created it. If you must make changes, build a new container image and reuse that new image across all environments.

  • Avoid storing permanent data inside your container.

  • Design your container so that it addresses a single purpose. For information on designing a container that serves multiple purposes, see the Using sidecar injection on Amazon EKS with AWS App Mesh blog post.

  • Make sure that your container implements all necessary APIs.

  • Design your container so that its system requirements are built around CPU usage, system memory, and persistent storage.

For more information on best practices, see Principles of Container-based Application Design in the Kubernetes documentation.