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.
Web servers receive a client request and retrieve content from the pertinent database to provide to the client. By contrast, application servers also facilitate web content to clients but are capable of processing dynamic requests.
The difference between a Server and a Web server is that the server is a central vault where computer programs and data are stored and gotten to by the customers in the network, while a Web Server is a PC program or a PC that runs the application.
A database refers to an application that provides the ability to store, backup, organize or modify digital files to a separate computing system. A server is a piece of hardware or software assigned to handle a specific type of computing function, such as connecting to multiple printers or hosting a website.
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.
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.
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.
Reference - Deployment Patterns
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With