Web Server vs Application Server

What is a Sever?

Server is a Computer that provides data to another Computer.

Computer that provides data can be named as the server and the computer that requests data can be named as the client. Internet consists a network of servers and clients or We can say Internet consists People, Computers and other devices. Software is the factor which turns a computer into a Server. Normal Desktop Computers can be turned into a Server by installing specific software and configuring them.

There are several types of servers and the installed software depends on the purpose or the type of the server. Below are several types of servers.
  • File server

  • Print server

  • Communications server

  • Application server

  • Database server

  • Domain server

  • Web server
Examples :Examples for Web Server are Apache HTTP Server and Microsoft IIS. Examples for Mail Servers are Exim and iMail. Examples for File Server are Samba and Linux Network File System. Example for Application Server are JBoss, WebLogic, WebSphere, Tomcat and Glassfish.

What is a Web Server

Web Server are designed to server HHTP/HTTPS requests. Web Servers serve static content like html, css ,js ,images and etc. Web Servers are well designed to server static content. Apache HTTP server is the most popular web server the world. Microsoft IIS and Nginx are also examples of Web Servers. No server side programming is in a Web Server. That means there can be no business logic in a Web Server. And there can be no databases in the Web Server. Some Web Servers have plugins to support server side languages such as PHP, Perl, ASP, JPS and etc.

XAMPP is the most popular Development environment for developing PHP Applications. XAMPP includes Apache HTTP Server, MariaDB, PHP, and Perl which enables it to create Dynamic Web Application. Apache HTTP server is used as the Web Server in XAMPP.

Here is the link to Apache HTTP server download for windows. Download, Install and explore what it can do.

What is an Application Server

Application Servers are well designed for Dynamic Content. It exposes business logic and processes. Application Servers also can Serve HTTP requests. But it not limited to that. It provides supports to protocols such as RMI/RPC. Application Servers can executes business logic on several protocols. Application server has all the functionality of a Web servers as well as some others. Application Servers provide service such as...
  • Resource management (Connection Pooling)

  • Object life cycle management

  • Transaction Support

  • Messaging services

  • Load balancing

  • State management (session) etc.

JBoss, WebLogic, WebSphere, Tomcat and Glassfish are examples for Application Servers. Application Servers are designed to use in situation where there are longer running and resource intensive processes.

Example :

def homepage():
    return '<html>Home Page</html>'

def about():
    return '<html>About us</html>'

If the application which contains above code is hosted in www.harshajayamanna.com domain. If the user visits https://harshajayamanna.com/, the program will execute the homapage() function and will return the "Home page" text to the browser. If the user visits https://harshajayamanna.com/about, the program will execute the about() function and will return the "About us" text to the browser. Only a code that runs on an Application Server can only do this and generate dynamic content like this.

We can change the implementation of the functions and make it return different values based on some user inputs.


Web Servers are to serve static content and Application Servers are to serve dynamic content. sometimes Web Servers act as the reverse proxy for the Application Server. In this case, Web Server identifies the requests and serves the static content while forwarding the requests for dynamic content to the Application Server. Examples for such scenarios are Apache Tomcat HTTP Server + WebLogic Server and IIS + SharePoint Server. In another case, IIS is a Web Server and when it is equipped with .NET run-time, it is capable of providing Application Server Functionality.

Now a days both these servers are used by developers effectively. They combine both of these to get the best results.

Note : A reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as if they originated from the proxy server itself.