Adam Bien's Weblog

Java EE Application Servers Are Not Suitable To Host Microservices

Due to low footprint, fast startup and low runtime overhead ("The Overhead Of Java EE Application Servers"), deploying multiple WARs into one application server instance running on a single JVM does not save a considerable amount of resources unless you have to deal with Netflix-like scale (ten thousands of dynamic VMs).

You could manage multiple WAR-microservices on a shared application server, but this approach would come with serious disadvantages:

  1. Less Isolation: A misbehaving WAR can influence other microservices
  2. Complicated Monitoring: it is harder to monitor the activity of a single WAR
  3. Less Stability: a redeployment of a WAR could influence others (memory leaks, classloader leaks)
  4. Less scalability: it is harder to scale a single process, than multiple processes
  5. More complex CI / CD: an executable image will contain multiple microservices and requires coordination between teams

Java EE Application Servers are not suitable to host multiple microservices. The way to go is to ship exactly one Thin WAR ("Thin WARs, Java EE 7, Docker and Productivity") with one application server instance and consider the OS, JVM, applicaton server and the Thin WAR as the executable unit.

A Java EE microservice architecture is about multiple application servers hosting exactly one WAR ("Why Not One Application Per Server?) communicating with each other. Using a single application server instance as a microservice runtime is too brittle, too complicated and hard to justify with numbers.

See you at Java EE Microservices where we build Java EE Thin WARs, and Java EE CI/CD, Testing and Quality workshop where the Thin WARs get automatically deployed.

NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.


A book about rethinking Java EE Patterns


Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments