10 Replies Latest reply on Oct 10, 2013 4:10 AM by rhusar

    Comparison between JBoss internal web server and apache?

    marcodanti

      Hi all, does anyone know of some reference/analysis about the pros and cons of using jboss internal web server against using an external web server like Apache?

      Thanks!

        • 1. Re: Comparison between JBoss internal web server and apache?
          jfclere

          Actually it is comparing apples and pears. Apache httpd is a kind of Swiss knife web server and JBoss default servlet is just a servlet optimized to serve files.

          1 of 1 people found this helpful
          • 2. Re: Comparison between JBoss internal web server and apache?
            rhusar

            +1 the question is not making sense. You cannot replace one with the other one.

             

            More interesting question would be:

            • What are the benefits of using reverse-proxy HTTPd in front of AS's internal webserver?
            • How much faster is serving static files via HTTPd instead of AS?
            • etc
            • 3. Re: Comparison between JBoss internal web server and apache?
              marcodanti

              Thanks guys for helping clarify things, some aspects of this whole thing are still foggy to me. So, as Radoslav suggests, let mw split into more meaningful questions:

               

              • What are the benefits of using reverse-proxy HTTPd in front of AS's internal webserver?
              • How much faster is serving static files via HTTPd instead of AS?
              • Apart from the benefits, what kind of impact can have the introduction of an Apache reverse proxy?

               

              Thanks!

              • 4. Re: Comparison between JBoss internal web server and apache?
                mbabacek

                Well, it depends...

                • What are the benefits of using reverse-proxy HTTPd in front of AS's internal webserver?

                Apache HTTP Server with mod_cluster used as a load balancer brings two essential features to your setup:

                • You can scale up your service as the demand grows simply by spinning up more AS instances, while your clients are completely oblivious to this fact. They keep accessing the same URL of their beloved web application - your Apache HTTP Server load balancer url.
                • If your client is working with one of your web apps and the AS instance serving this web app crashes, your Apache HTTP Server load balance aka mod_cluster simply addresses another AS instance that is offering the same web app, so, if you have session replication in place, your client experiences just a tiny lag, no nasty "service unavailable" errors and the session data are still present.
                • How much faster is serving static files via HTTPd instead of AS?

                Well...one generally wants to off-load as much IO from AS instances as possible and serving static content from Apache HTTP Server is quote faster unquote. Nevertheless, one must stress-test ones own web application and assess the benefits, because it depends on your particular case. If you are loadbalancing a web application that actually serves only some JSON, that is always generated on AS instance, any static content serving setup on Apache HTTP Server makes no sense, whereas if one has a rich full-of-many-bitmaps web application, it can make a huge benefit to the network traffic/AS instance IO to serve these files from memcache enabled Apache HTTP Server.

                • Apart from the benefits, what kind of impact can have the introduction of an Apache reverse proxy?

                With mod_cluster and Apache HTTP Server, there are only benefits :-)

                1 of 1 people found this helpful
                • 5. Re: Comparison between JBoss internal web server and apache?
                  rhusar
                  • What are the benefits of using reverse-proxy HTTPd in front of AS's internal webserver?

                  Apache HTTP Server with mod_cluster used as a load balancer brings two essential features to your setup:

                  Few more things on my mind:

                  • no need to raise permissions for AS to open standard HTTP port (80)
                  • ability to setup custom "service unavailable" page instead of complete failure ala no port open during complete failure/restart/updates/etc
                  • DNS loadbalancing

                   

                  • Apart from the benefits, what kind of impact can have the introduction of an Apache reverse proxy?

                  With mod_cluster and Apache HTTP Server, there are only benefits :-)

                  We should mention there is some -- a little -- overheard as a new TCP connection or communication needs to be done.

                  • 6. Re: Comparison between JBoss internal web server and apache?
                    marcodanti

                    Thanks, this is helping a lot; maybe also the following is another benefit?

                     

                    • Where certificates are used, SSL processing can be performed by Apache alone, offloading the AS servers
                    • 7. Re: Comparison between JBoss internal web server and apache?
                      rhusar
                      • Where certificates are used, SSL processing can be performed by Apache alone, offloading the AS servers

                      I suppose the best way is to setup two way SSL authentication that is to have Apache and AS trust each other.

                      • 8. Re: Comparison between JBoss internal web server and apache?
                        marcodanti

                        In the configuration I have now, apache is set up to use a certificate to allow client browsers to verify the identity of the server they are talking to. All SSL processing is done by Apache, and the communication between Apache and the backend JBoss servers is not encrypted. The JBoss servers are hidden behind the reverse proxy so this configuration seems to make sense to me, but from your reply now I have some doubts. Does the configuration I described makes sense to you?

                        • 9. Re: Comparison between JBoss internal web server and apache?
                          jfclere

                          Yes a configuration with reserve proxy is a standard way to work.

                          • 10. Re: Comparison between JBoss internal web server and apache?
                            rhusar

                            Right, depends if you "trust" your internal network, since the communication from proxy to AS will be unencrypted. I believe in majority of cases, this is not a problem.