concept native web server in category jboss

This is an excerpt from Manning's book JBoss in Action: Configuring the JBoss Application Server.
Figure 5.10. JBoss Web Server can accept HTTP or HTTPS directly from a web browser or a native web server. It can also accept AJP requests from a native web server.
![]()
But clients don’t always communicate directly to a servlet container; sometimes they communicate with a native web server, which in turn, communicates with a servlet container. The native web server can forward the HTTP request to the servlet container using either the HTTP or HTTPS protocol. But JBoss Web Server supports another protocol called AJP that allows native web servers to send the request in a binary format, which can be faster in many cases. The bottom portion of figure 5.10 illustrates the different forms of communication that can occur between a web browser and a native web server and, in turn, between a native web server and JBoss Web Server.
Figure 12.2 showed you a typical network topology where a load balancer runs inside of the DMZ and forwards requests to JBoss instances that run behind the firewall. With this topology, the load balancer provides scalability while the application servers are protected by being behind the firewall. The load balancer can be a hardware load balancer or a software load balancer. Software load balancers are typically in the form of native web servers that provide a mechanism for load balancing across JBoss instances. Let’s look at how to configure both hardware and software load balancers for web applications.
Apache ships with a plug-in called mod_proxy that supports both HTTP and AJP load balancing. Many people find mod_proxy to be significantly easier to configure even though mod_jk has a longer history and is considered more stable. There are other plug-ins available as well. Each plug-in has different versions that work with different versions of the native web server that you’re using. Different combinations of native web servers and plug-ins have their own unique configuration and performance pros and cons. Unfortunately, it’s outside the scope of this book to explain how to install and configure the various plug-ins in the different native web servers. With a little bit of searching online, you should be able to find an article or two that cover the details of the particular web server and plug-in combination that you’re trying to install. We have a few links at the end of the chapter that show you how to install some of the more popular combinations. We had good luck with Apache 2.2.9 and mod_jk 1.2.26 while testing things out for the book.
After you get the native web server installed and the appropriate plug-in configured, you’re almost ready to load balance requests to JBoss. If you want your native web server to be able to use sticky-session load balancing across your JBoss instances, you must make a change in the JBoss Web Server configuration on each of the application servers you’re load balancing to. In the server/xxx/deploy/jbossweb.sar/server. xml file, define a jvmRoute attribute on the Engine element, where the value of the attribute is unique among the JBoss AS server instances you’re running. The jvmRoute setting isn’t present in the server.xml file, so you’ll have to add it to the Engine definition. After configuring the server.xml file, it should look like this: