How a web server works?
The term “Web Server” is a program (the term can also refer to the computer the program is running on) which in simple terms acts like a delivery agent between the clients (web browsers) and the World Wide Web (or the internet). The communication Protocol here is HTTP (Hyper Text Transfer Protocol); hence sometimes a Web Server is also called a HTTP server.
A brief overlook of HTTP
HTTP is the “language” or protocol using which computers on the World Wide Web talk to each other. The client asks for specific files/pages/data to the server and the server returns the request. All the communication done is through HTTP. These are predefined set of rules and thus form a protocol between the client and the server. HTTP 1.1 is the current version used in the World Wide Web.
The Client Side
The client (Web Browser) talks the server with a Universal Remote Identifier (URI). This has many components, first defines the Protocol to be used. Most of the time it is HTTP but other protocols like Ifap, FTP and Malto too can be sent. A Web Server recognizes only HTTP and returns Error for others.
The browser connects to the server on port 80. This is usually the case when no port is specifies in the URL like http://xxx.zzz.com:436. Here 436 was explicitly specified.
The Server Side
Every server has an IP address. After the client establishes the connection with this IP address and requests for a specific page the server looks at the file extension of the requested page. If the client requests for a file that is a simple HTML or an HTML extension then the web server fulfills the request and processes the file to the browser. If the client has requested for a page that needs to be processed by a web application server then a web server passes the request to the application server. Now the application server takes over and processes the file/page and returns the results to the web server. Following which the web server returns the request with the desired file/page. The purpose of the web application servers is to interpret the programming instructions and generate the page that a web browser can interpret. They help in the construction of dynamic web pages by the developers.
The operations which take place
The user types in an address, e.g. www.address.com in the web browser and a socket will be created which will allow the client to send/receive data (bytes).
The HTTP request is created by the browser (after examining the URI and the HTTP method).
After a successful/valid HTTP request a connection is made using the TCP connection port 80.
The web server examines the request, if valid processes it.
Fetches the required page and returns it back to the client. If the web server fails to fetch the requested page then it returns ERROR.
At Bounceweb hosting, you get to work with the most efficient web servers!
Leave a Reply
You must be logged in to post a comment.