[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.java.programmer

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

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

Daniel Pitts

6/11/2016 7:42:00 PM

On 6/10/16 3:48 PM, Qu0ll wrote:
> DISCLAIMER: Server-side Java is not my forte.
>
> 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?
>
It isn't always necessary, but they provide different specializations.

The Apache (or nginx) provides some basic file serving, redirects, URL
masking, etc... They also make it easier to serve multiple applications
behind a single host.

Where I work, we used to have many more layers than even that:


1. Akamai
2. Load Balancer
3. Apache
4. Load Balancer
5. Custom Proxy #1 (For non-cachable/real-time decisions)
6. Load Balancer
7. Caching Proxy
8. Load Balancer
9. Custom Proxy #2 (For cachable global logic)
10. Load Balancer
11. Web Application(s)


Because we used an HTTP API, it went even deeper. The "Web Application"
would call into our API stack:

1. Load Balancer
2. Apache
3. Caching Proxy
4. HTTP API Application(s)

The API would then connect to MySQL or SOLR (Solr being another
web-app), and other data-sources.

Could we do all of this in a single application? Yes! But it wouldn't be
quite as robust, would be harder to manage, and would require us to
right a lot more custom code to do the functions that Apache did for us.

We've since simplified our architecture a lot (no more custom proxies),
and use nginx instead of apache.

Daniel Pitts

6/11/2016 7:45:00 PM

On 6/11/16 12:41 PM, Daniel Pitts wrote:
> On 6/10/16 3:48 PM, Qu0ll wrote:
>> DISCLAIMER: Server-side Java is not my forte.
>>
>> 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?
>>
> It isn't always necessary, but they provide different specializations.
>
> The Apache (or nginx) provides some basic file serving, redirects, URL
> masking, etc... They also make it easier to serve multiple applications
> behind a single host.
>
> Where I work, we used to have many more layers than even that:
>
>
> 1. Akamai
> 2. Load Balancer
> 3. Apache
> 4. Load Balancer
> 5. Custom Proxy #1 (For non-cachable/real-time decisions)
> 6. Load Balancer
> 7. Caching Proxy
> 8. Load Balancer
> 9. Custom Proxy #2 (For cachable global logic)
> 10. Load Balancer
> 11. Web Application(s)
>
>
> Because we used an HTTP API, it went even deeper. The "Web Application"
> would call into our API stack:
>
> 1. Load Balancer
> 2. Apache
> 3. Caching Proxy
> 4. HTTP API Application(s)
>
> The API would then connect to MySQL or SOLR (Solr being another
> web-app), and other data-sources.
>
> Could we do all of this in a single application? Yes! But it wouldn't be
> quite as robust, would be harder to manage, and would require us to
> right a lot more custom code to do the functions that Apache did for us.
>
> We've since simplified our architecture a lot (no more custom proxies),
> and use nginx instead of apache.

Oops, I missed two load-balancers in the API stack ;-) Basically, we
always had a load balancer between each layer. We even had a
load-balancer for MySQL and SOLR query tiers.

So, each request was serviced by a total of at least 17 hops. 19 if you
count the data source connections.

Now, flat-files (images, javascript, etc...) weren't served by the web
applications, but instead put on a shared filer that was served directly
by Apache. Again, we *could* have done it through the web-app, but that
would have been a much more complicated web-app.

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

6/11/2016 9:46:00 PM

On 6/11/2016 3:45 PM, Daniel Pitts wrote:
> Oops, I missed two load-balancers in the API stack ;-) Basically, we
> always had a load balancer between each layer.

Apache httpd can act as load balancer for the Java app
server.

Arne

Daniel Pitts

6/13/2016 4:05:00 AM

On 6/11/16 2:45 PM, Arne Vajhøj wrote:
> On 6/11/2016 3:45 PM, Daniel Pitts wrote:
>> Oops, I missed two load-balancers in the API stack ;-) Basically, we
>> always had a load balancer between each layer.
>
> Apache httpd can act as load balancer for the Java app
> server.
I don't doubt it. We had specialized hardware to do it though, already
in place. Citrix NetScaler I believe, though I wasn't really involved
at that level.


Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Is it necessary to have both an application server AND a web server?

Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te

Il servizio è completamente GRATUITO!