Running Java applications on Azure Container Apps

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

Developers love containerization for its ability to ensure consistency, portability and manageability of their applications, while aligning with modern DevOps practices. Azure Container Apps is a great platform for running polyglot apps and containers of all kinds in Azure, as it abstracts away the complexity of managing underlying Kubernetes while providing unified networking, observability, and scaling for higher developer velocity. While it serves as a versatile container platform, it may not offer precise insights into your Java applications or the state of your Java execution environment (such as the JVM). To better cater to our Java-centric customers running containerized apps, we've recently initiated a new journey to enhance the Java developer experience on Azure Container Apps.

 

To better understand the developer experience, we’ve mapped the user journey into several key stages, where we seek to identify underserved customer needs in the context of running containerized Java apps on Azure.

 

Sean_Li_2-1701754049529.png

 

 

Build: In the development cycle, the focus is code, while in the deployment and operation cycle, the focus is the container. We want to make it smooth to transition from code to container and make both cycles efficient. One common practice is to containerize Java applications with dockerfiles. However, this process introduces overhead to developers and can also lead to application inconsistencies, as well as challenges in performing updates and in policy governance. Our focus is to address these concerns through the Java cloud build process, leveraging cloud-native Buildpacks to simplify containerization.

 

Monitor & Scale: Logs and metrics are incredibly powerful and important when it comes to monitoring and scaling apps. All Java developers we talked to rely heavily on logs and metrics to assess application health and identify issues. Azure Container Apps is natively integrated with Azure Monitor and already reports container-level metrics. We want to make it even better by providing logs and metrics about your apps. JVM metrics, such as GC metrics, are sometimes useful for analyzing how memory is used, but they are underutilized when debugging apps. Providing more Java metrics and logs can help developers and operators gain deeper insights on applications’ running status, detect potential issues, and hopefully pinpoint issues. Furthermore, you can use standardized Java metrics for auto-scaling in KEDA to unlock a spectrum of powerful autoscaling scenarios.

 

Diagnose: Mission critical Java applications often suffer from availability and performance problems. Developers and IT administrators spend a lot of time diagnosing the root cause of these problems. Frequently, problems occurring in production environments can’t easily be reproduced, or simply can’t be recreated in other environments. This can have a severe impact on the business. We know there are several key areas where errors tend to occur. Errors such as memory issues, Null pointer exceptions, deadlocks, and so forth re all very common and detrimental to application health. In the fullness of time, our north-star direction is to deliver a set of live diagnostic experiences where developers will be notified and can find issues on the spot. But before we realize our longer-term ambition, our mid-term objective is to provide options for developers to capture and download diagnostic information (thread dump, heap dump, and so forth) for offline analysis.

 

This blog is the beginning of a series that unravels the story of Java on Azure Container Apps. We will use the Spring Petclinic project as the baseline architecture to illustrate concepts and showcase product capabilities. As development continues and features are added, we’ll make architecture changes and introduce samples to illustrate new scenarios revealed by those features. You can expect future episodes to evolve based on the ACA roadmap.

Here’s the tentative outline of the blog series for the next 6 months:

Episode 1 : Build and deploy polyglot apps
Episode 2 : Build and deploy Java apps with CI/CD
Episode 3 : Monitor your apps with managed Java metrics 
Episode 4 : Diagnose unexpected process termination and Out-of-Memory error in Java apps

 

To wrap up, check out the ACA roadmap on GitHub and stay tuned for the first episode of “Running Java apps on Azure Container apps” at the Microsoft Community Hub.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.