3 ms·
It depends on how you develop your application. If you are building a war you need to serve it with a java application server like tomcat, jetty etc. Some fra
by moondev 11y ago
It depends on how you develop your application.
If you are building a war you need to serve it with a java application server like tomcat, jetty etc.
Some frameworks like spring boot can build an "uber jar" which is basically like a batteries included executable. You just run it with java -jar directly and it begins taking requests.
nginx is generally used as a proxy and load balancer. I would reccomend you use an ELB if you are on aws though. The basic idea is that you setup your application server to auto-start on launch. Bake your instance into an ami (amazon machine image), Then you can create an auto-scaling group using that ami and attach an elb to it. As long as your java application is stateless it will work like a charm.