
However, there are some subtleties here that might not be apparent to engineers who are not Java specialists. This seems to make sense, as cloud-based applications are typically charged by the amount of RAM and CPU they use. Microservice architectures tend to imply smaller process sizes and shorter lifetimes.Īs a result of these factors, many developers, when migrating their Java applications into containers, try to use the smallest possible containers. This model of deployment for Java apps is challenged by cloud deployments in a few distinct but related ways:Ĭontainers might live for much shorter time periods (seconds, in some cases).Ĭluster sizes might be dynamically readjusted or reconfigured (e.g., through Kubernetes). Scalability of Java applications typically focused on scaling up, with the goal to make Java perform efficiently on large multicore machines with large amounts of memory. In that world, cluster scaling involved ordering more physical machines and having them delivered to your data centers, application version upgrades happened perhaps every few months, and application processes measured their uptime in weeks or months. This makes sense when we remember that Java started as a server-side technology in an era where JVMs ran on bare metal in data centers. The traditional Java application lifecycle consists of a number of phases: Bootstrap, intense class loading, and a warmup with just-in-time (JIT) compilation, followed by a long-lived steady state lasting for days or weeks with relatively little class loading or JIT. This article focuses on the choice of garbage collector (GC) and how the default choice is based on available CPUs and memory. Teams using Java need to pay special attention to some aspects of container-based deployments and adopt a couple of best practices. Anecdotal data also tells us that this migration trend is far from over. Like all data points, this one is an imperfect proxy for the market as a whole, but the report demonstrates that a significant subset of the Java market has already moved to container-based environments. However, some data is available-for example, data from New Relic suggests that over 62% of their customers' Java workloads run in containers.



The exact number is hard to determine, because adoption of containers depends upon the market segment and cloud maturity of each particular team or company. An increasing number of Java applications run in containers.
