Why use Apache Web Server in front of Glassfish or Tomcat?

后端 未结 5 1337
遇见更好的自我
遇见更好的自我 2020-12-07 09:08

Is it good idea to use Apache Webserver in front of GF or Tomcat? Does it improve the performance/security?

Or there is not any reason to use Apache Web Server with

5条回答
  •  醉话见心
    2020-12-07 09:46

    • Scalability - As Amir and user384706 pointed out, you can load balance multiple instances of your application behind Apache. This will allow you to handle more volume, and increase stability in the event one of your instances goes down.

    • Security - Apache, Tomcat, and Glassfish all support SSL, but if you decide to use Apache, most likely thats where you should configure it. If you want additional protection against attacks (DoS, XSS, SQL injection, etc.) you can install the mod_security web application firewall.

    • Additional Features - Apache has a bunch of nice modules available for URL rewriting, interfacing with other programming languages, authentication, and a ton of other stuff.

    • Performance - If you have a lot of static content, serving it with Apache will improve your performance. If most of your content is dynamic, using Tomcat or Glassfish alone will be just as fast (probably faster). (as pointed out by answers to this question, this isn't true any more.)

提交回复
热议问题