Server is a special kind of computer. Server will do specific work like being web server, email server etc… Even a normal desktop with normal configuration can act as server.
Web server
Web servers mostly installed to do web related work. It plays an important role in website functioning. Web server connects with other computer forms a web network.
Web server mainly do six important function when dealing with website. They are:
1) Listens
2) On a port
3) Request
4) Transport protocol
5) Response
6) Resource
web server on “Listens”
The Web server will be idle if the browser doesn’t send any request to web server fetching for specific resource. if browser search some url in search bar, the work begins.
web server on”port”
The network protocol we use provides nearly 65,635 ports for communications on internet. By default , the http protocol used 80 port for all web works. https uses 443 port.
“Request”
In simpler term, web browser makes a request with url on specific port. Now the IP address of the requested website is given back to web browser. To make this happened a special protocol is followed.
We use a lot of protocol, As a result of that many different functions work. Primarily there are 3 types of protocol. They are:
1) HTTP
2) FTP
3) SMTP
HTTP are useful for web related resource , FTP works for file transfer like dropbox, google drive. Finally SMTP works for all mail related queries.
“Transfer protocol”
Even mistakes if we send resource on wrong protocol, result will not change. The tcp will give the correct file to their port.
The http or ftp request and response is in application layer of OSI model. As a result of which lies beyond the TCP layer protocol. The main work of TCP is, it will break down response into packets.
“Response”
As a opposite action of request from browser, the it fetch some resource from it and send it back to browser. The request can be any type like html, css, image, video type.
“Resource”
Web resource are the source file of a website which will already be loaded in it. When the server takes the file and give it as response for some request. It could either be static or dynamic site.