Difference between web server, application server and database server
Asked Answered
X

3

61

I read somewhere that a web application consists of a web server, application server and a database server. What is the difference between these three ?


I asked this question because I remember when I hosted a website, all I had was a https login to the control panel of the website, in which I put all my files in htdocs folder. There were no three separate things like the web server, application server and the database server.

Ximenes answered 24/10, 2012 at 4:2 Comment(0)
S
56

Web Server -

Server on which your website is hosted. This server will have installed web servers such as IIS, apache, etc.

Application Server -

Server on which your created applications which are utilizing your database, web service, etc. This application server will host business layer (wrapped with web services), scheduled jobs, windows services, etc.

Database Server -

Database server will have your one or more database hosted such as Oracle, Sql Server, MySql, etc.


If you are referring to htdocs then it is a Web Server. The database you are using is must be installed on different server which is your Database server. Application server can also be installed on the same web server machine.

enter image description here

Reference - Deployment Patterns

Supremacist answered 24/10, 2012 at 4:8 Comment(3)
It had a database as well (MySQL) in it.Ximenes
database as well MySQL? MySQL is a database. I believe you have Web Server and Database server on the same machine. You can have them on different machine too.Supremacist
Read following article on MSDN - msdn.microsoft.com/en-us/library/ee658120.aspxSupremacist
G
68

This often gets confusing.

Firstly - "Server" can refer to a physical thing (a computer), or a logical thing (a piece of software).

Web, application and database server software can all run on the same physical server machine, or be distributed across multiple physical machines. Most large websites have multiple machines; most "consumer" hosting packages run on a single box.

The logical separation is as follows.

The Web server deals with HTTP(S) requests, and passes these requests on to "handlers". They have built-in handlers for file requests - HTML pages, images, CSS, JavaScript etc. You can add additional handlers for requests that they cannot manage - e.g. dynamic pages delivered by the application server. Web servers implement the HTTP specification, and know how to manage request and response headers.

The application server handles requests which create dynamic pages. So instead of serving an HTML page that is stored on the hard drive, they dynamically generate the HTML sent to the end user. Common languages/frameworks for this are Java/JSP, .Net (aspx), PHP, Ruby (on Rails or not), Python etc. Most of the time, this application server software is running on the same physical server machine as the web server.

The database server software is where the application stores its structured information. Typically, this means custom software which allows the application server to ask questions like "how many items does user x have in their basket?", using a programming language. Examples are MySQL, SQL Server, Oracle (all "relational databases"), and MongoDB, Redis and CouchDB ("NoSQL" solutions).

The database software can run on the same physical machine as the web server, but it's usually the first thing that gets hosted on separate physical hardware when the site needs to scale.

Gaptoothed answered 8/7, 2016 at 8:42 Comment(0)
S
56

Web Server -

Server on which your website is hosted. This server will have installed web servers such as IIS, apache, etc.

Application Server -

Server on which your created applications which are utilizing your database, web service, etc. This application server will host business layer (wrapped with web services), scheduled jobs, windows services, etc.

Database Server -

Database server will have your one or more database hosted such as Oracle, Sql Server, MySql, etc.


If you are referring to htdocs then it is a Web Server. The database you are using is must be installed on different server which is your Database server. Application server can also be installed on the same web server machine.

enter image description here

Reference - Deployment Patterns

Supremacist answered 24/10, 2012 at 4:8 Comment(3)
It had a database as well (MySQL) in it.Ximenes
database as well MySQL? MySQL is a database. I believe you have Web Server and Database server on the same machine. You can have them on different machine too.Supremacist
Read following article on MSDN - msdn.microsoft.com/en-us/library/ee658120.aspxSupremacist
P
-5

Web Server: The server on which all your HTTP requests are handled is known as a web server where as Application Server: Including the services of web server i.e responding to the HTTP requests it also responds to the business logic thus not just limited to the HTTP protocol Eg. gaming servers, chat rooms etc.

Pitchdark answered 21/5, 2014 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.