What is a server?
- A server is a piece of software or hardware or both that receive and respond to requests over a network.
- In general, servers are used to manage network resources. They can be used to store files such as images and videos as well as host websites and databases.
- In terms of web servers, the web server will host the files used to make the website so that when a browser makes an HTTP (Hypertext Transfer Protocol) request, the webserver can deliver this content to the user via an HTTP response.
Image source: Mozilla Developer Network
Why do we need servers?
- As web developers, we need servers for several reasons. At the basic level, a static web server suffices to host a static web-page, which is served โas-is.โ
- On the other hand, a dynamic web server has the application server as well as a database, which allows it to process content and can generate pages. This type of server can be used to store information from user interactions, which can be used later on.
Benefits of a server
- Always on
- Always connected to the Internet
- Same IP
- Maintained by 3rd party
Resources: