Microservices in Java? Never.
Elliot Forbes
1.4K25

Elliot, you have raised a very good question regarding to microservices in JVM. I guess you are using an JEE container to develop microservices and it is a platform designed for monolithic applications. Does it make sense to have 200 lines of code deployed to 20 million lines code Weblogic and only 5 percent of resources are used by your 200 line of code? I myself faced the same issue years ago and built a platform light-4j for microservices in Java SE. The minimum memory usage is only 4MB and up to 100MB depending on the size of your service. Also, the hybrid style of services can be deployed into the same JVM to save more resources as hundreds of services can share the same JVM but each service can be deployed independently. These days most people are using spring-boot but it is a JEE based platform and use at least 1GB memory and up.

Beside using less resource, the platform is super fast and it serves up to 3 million requests per second for hello world and 150K request per second for db query to generate a webpage.

https://github.com/networknt/light-4j

https://www.techempower.com/benchmarks/

Like what you read? Give stevehu a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.