Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34606

Re: Is it necessary to have both an application server AND a web server?

Path csiph.com!aioe.org!.POSTED!not-for-mail
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Is it necessary to have both an application server AND a web server?
Date Sat, 11 Jun 2016 17:44:10 -0400
Organization Aioe.org NNTP Server
Lines 57
Message-ID <nji0na$17vj$1@gioia.aioe.org> (permalink)
References <njfg37$1hj0$1@gioia.aioe.org>
NNTP-Posting-Host 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.java.programmer:34606

Show key headers only | View raw


On 6/10/2016 6:48 PM, Qu0ll wrote:
> I have often noticed that in many places where I have worked, the
> companies have both a full application server such as JBoss/Wildfly AND
> a web server (typically Apache) installed and both seem to work together.
>
> 1) Is this necessary and if so, why?
> 2) What does a web server "provide" that an application server doesn't?
> 3) What is the nature of the relationship or interaction between both
> applications?

The setup:

--Apache httpd--Tomcat/JBoss/whatever

is very common.

It is not strictly necessary, but it does provide some benefits.

Probably the most important is the security aspect. Because the
flow above is an oversimplification. Usually it is:

internet|                  DMZ                  |   secure network zone
--Firewall--Apache httpd with mod_security--Firewall--Tomcat/JBoss/whatever

where the Apache httpd in DMZ is used to protect the application.

In many security minded environments you would not be allowed to
expose an application without a proxy in DMZ in front of it.

In the old days there were a performance benefit by terminating SSL
in Apache httpd instead of in Tomcat/JBoss/whatever, because Apache
httpd had native highly optimized SSL code while Java SSL was not quite
as efficient.

That is not important today as SSL would typical be offloaded
in a network box not in a real server (network boxes today are really
servers inside, but you know what I mean).

Then there is the static content. Often it has advantages to
serve that by Apache httpd instead of Tomcat/JBoss/whatever.

Tomcat/JBoss/whatever can serve static content but there are
some reasons why a dedicated server may be better in many
cases:
* a web server written to serve static content may be more
   efficient than a Java app server, where support for static
   content may have been a very low priority in development.
* Apache httpd comes with advanced options for cache control
   that Tomcat/JBoss/whatever does not have.
* the static content may be produced by a different team than
   the one producing the Java web app, so requiring the static
   content to be bundled into the war file can be an organizational
   hassle.

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is it necessary to have both an application server AND a web server? Qu0ll <qu0ll64@gmail.com> - 2016-06-11 08:48 +1000
  Re: Is it necessary to have both an application server AND a web server? Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2016-06-11 00:43 -0700
  Re: Is it necessary to have both an application server AND a web server? Daniel Pitts <usenet@coloraura.com> - 2016-06-11 12:41 -0700
    Re: Is it necessary to have both an application server AND a web server? Daniel Pitts <usenet@coloraura.com> - 2016-06-11 12:45 -0700
      Re: Is it necessary to have both an application server AND a web server? Arne Vajhøj <arne@vajhoej.dk> - 2016-06-11 17:45 -0400
        Re: Is it necessary to have both an application server AND a web server? Daniel Pitts <usenet@coloraura.com> - 2016-06-12 21:05 -0700
  Re: Is it necessary to have both an application server AND a web server? Arne Vajhøj <arne@vajhoej.dk> - 2016-06-11 17:44 -0400
  Re: Is it necessary to have both an application server AND a web server? Qu0ll <qu0ll64@gmail.com> - 2016-06-16 06:58 +1000
    Re: Is it necessary to have both an application server AND a web server? Arne Vajhøj <arne@vajhoej.dk> - 2016-07-07 22:31 -0400
      Re: Is it necessary to have both an application server AND a web server? Daniel Pitts <usenet@coloraura.com> - 2016-07-08 08:31 -0700

csiph-web