What are the major differences between a web application deployed as a JAR versus it deployed on an application server as a WAR?
My case is that, I have developed a REST service using Spring Boot and that is packaged as a JAR file. The service may have to handle 500-1000 requests at the same time and I'm working on improving the performance of the service.
From a performance perspective, is it better to install an application server and deploy the application as a WAR rather than just execute the JAR as a standalone process?
Would the application server like Tomcat give more control related to number of configurable threads as compared to its JAR counterpart?
The question is a bit incorrect, as JAR and WAR are simply a packaging format.
SpringBoot uses Tomcat as an embedded server by default, so there won't be a difference between running Tomcat as application server and deploying your application as WAR, or simply running a JAR.
What really matters is your code. If you plan to serve 1000rps, I would highly advice looking at Spring Reactor (as you already use Spring) or Vert.x, to provide as much concurrency as possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With