Answer the question
In order to leave comments, you need to log in
How to properly install Jetty (production ready)
Habralyudi, something I got a little stumped, enlighten me.
Before that, I had experience with Apache Tomcat, and there everything seemed logical and simple to me. Tomcat is just a servlet container ( wiki ), not a full-fledged server, and therefore it is usually not put in front (although some do), but pushed behind the Apache HTTP Server. Apache is put in the front, to which one or more Tomcats clung through mod_jk. Apache served static content and acted as a load balancer across multiple Tomcat instances, allowing for easy horizontal scaling. All this is written in the documentation for Tomcat ...
But now I switched to Jetty. There are circumstances that force...
In general, the application is written and locally everything works fine. But then the question arose of how to properly deploy Jetty so that it would be possible to scale horizontally by adding new jetty instances and distributing the load between them, sticky-sessions, and so on ...
And here is the most incomprehensible thing ...
In general, Jetty seems to represent is not only a servlet-container, but also a full-fledged server, wiki . In this regard, in the documentation for Jetty there is a very sarcastic statement:
Apache httpd is a HTTP server written in C, that is often used to front other web services. Jetty is a full functional and optimized HTTP server and has no need of an apache httpd instance between it and the internet. However, deployers often want to place an instance of apache between Jetty and the internet for some of the following "reasons"
Answer the question
In order to leave comments, you need to log in
Yes, the standard solution is to put nginx in front of Jetty. And in general, in any case, it is better not to give statics from Java, regardless of what they wrote there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question