Server Types & Use Cases
Here are a few different use cases for servers.
Web Servers & Database Servers
There are different kinds of use cases for servers. In this course we are mostly concerned with websites. So, one use case is the serving of web pages to web browsers that requested the web page. The web pages can be stored on the server computer itself or are saved in a database. The database application can run on the same server computer or on a separate server computer to distribute the work across two computers. In the latter case one server computer would be the web server and the other one a database server.
Sometimes a server offers a service for computing difficult tasks. One example would be a server that is running a large language model to power a chat bot. These artificial intelligence models are trained with vast amounts of data. Thus, running a model has high performance requirements. The biggest models cannot run on normal consumer hardware. Therefore, such a model is run on powerful hardware. In summary, it works like this:
Let's assume you already opened the website of the chat application and it is fully loaded in your browser. Once you type a question or statement into the chat (prompt) and press Enter
, the web application initiates the browser to make a request to a server. The request contains your chat prompt as text data. A server receives the requests and feeds the text prompt into the large language model. The model calculates a fitting answer. Because the server computer is powerful it only takes a short time to compute a good answer. Then the server sends back a response to the browser which in turn displays the answer in the user interface (with JavaScript).
Load balancing: Prevent Slow Load Times for High-Traffic Websites
If a website becomes popular and has a lot of people visiting the website at the same time this can become too much work for a single computer. Users would need to wait until the server has processed one request after the other. Waiting annoys and frustrates users so that they would use a competitive service. Because you don't want to lose customers, you can use multiple servers to distribute the large number of requests across multiple computers, so that it is a manageable amount for each computer.
Sometimes you have one server that receives all requests and then forwards them to multiple servers to do the actual work. This is comparable to the receptionist who welcomes you at the entrance of a restaurant. Instead of having 50 people sit at one small table, a restaurant has multiple tables. The receptionists has the simple job of assigning you to a free table and the waiter and cooks are doing the actual work to serve meals.
Domain Name System Server
A separate page explains the Domain Name System in more detail.
More Examples
A mail server sends, receives and stores emails. Mail servers use the Simple Mail Transfer Protocol (SMTP) to transfer emails from a sending email server to a receiving email server. Email clients like Outlook, Thunderbird, Apple Mail or smartphone apps typically use a different protocol (POP3 or IMAP) to download emails from the server to display them on your device.
A game server is necessary for multiplayer games like Minecraft, Fall Guys or World of Warcraft to connect you to friends or strangers via the internet. A typical game server manages and stores information about each character in the virtual world. When a player presses buttons to move their character the server receives these movement commands, calculates the new position of a character and broadcasts the new character position to all other players.