Server
So we've been talking a lot about clients, but that's only half of the equation. You likely have heard the term "server" before, but let's talk a bit about what it is and how it works.
What is a server?
Let's say you type the url https://www.facebook.com/
into your browser window. From a base level, your browser connected to a Web Server, requested the web page for Facebook, received it from the server, and presented it on your screen.
Unfortunately, nothing can ever be easy. A "server" can mean several different things, depending on its context:
The software used to host/deliver web pages
The hardware that runs said software
Both the software and hardware working in tandem
A server receives a request (such as an HTTP GET) from the client, then returns a response, similar to a container. It can contain a url, an image, some data, something else, or any combination of the above. Sometimes the server will pass a request to a database for more information, then receive that response back before sending it on to the client.
Example
Let's go through a login request as an example. 1. The client sends their username and password to the server 2. The server passes that request along to the database. 3. The database checks to see if it contains that username, and if the password matches what is linked to that username. 4. The database will return either a success or failure response code to the server. 5. The server then passes that that response back to the client, to be displayed in some way on-screen.
A Server in Terms of Client/Server Relationship
For simplification, the server that we are talking about here is where we can send an HTTP request to and get information back from.
Last updated