Server and its usage.
Tags: webdev, beginners, html, programming
Published: 2022-12-25 11:25:20


## "What is server?"
The server is basically a program or a device which provides the functionalities or services to the other computers which is known as clients.

Here the client request the data the server will serve the data based on client information.

Multiple clients will interact with the server at a time.

This is called as **Client - Server** model.


![Cilents interact with server through internet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29rs44zf28vc6qf4mj2v.png)

## "How the Client interact with the server ?"
Here server will sends the data and stores the data it is correct but how the client will interact with server it is problem right !
We have soluction for that, here we use "DNS" it is called **DOMAIN NAME SPACE**.
So every website have the domain name by the help of this we directed to the website what we are looking for.
It is look like this "www.domainname.com". The domain name would be any thing like "google.com" or "gmail.com" any thing.

But internally the **DNS reslover** will convert the domain name into the ServerIP address. After that the server will receive the request and it will produce the output to the client.

This process is done through the "internet".

## "Types of servers"
There are multiple types of servers they are:

- Web Server

- Application Server

- Database Server

- Game Server

- Mail Server

- Proxy Server

- Cloud Server

All the server provides the same functionality but different purposes use different servers.

**Web Server**
   The web server provides the lots of data about the websites components. The web server always connected to internet because if the host want to change the data he can directly change the content.

The static site is known as we are storing the data in our local storage. So if any modifications done on website content it is not reflected on website we have to explicitly save the content and we have to reload the site. That's why we are calling it as "Static".

The web site is a "dynamic" because we don't need to reload the page every time if any modifications is done on website. Whenever site state is changed than the server will automatically update the content on the website. That's why we are calling it as "Dynamic".

Here the website is work based on the "HTTP" server. The HTTP server that understands the URL's and HTTP(Hyper text transfer protocal) or HTTPS(Hyper text transfer protocal secure). The HTTPS did not allow any third party users it is secure.

Whenever client require the file that is hosted on web server, the client request the server by using via HTTP. After the request reaches to the webserver the server will process and it will find the correct data and response to the client browser.
**Types of Web servers**

1. Apache: It is free and open source web server which uses the HTTP server to access the data from the website through the internet.

2. Nginex: It is free and open source which uses the HTTP server to access the data from website. It is better than the Apache.

 3.Microsoft IIS: To exchange the information between the client and server.

![Web Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ypzavrye46c6il66m0x.png)


**Application Server** 
The Application server provides the access to the web apps. Here we can directly access the data of perticular webapp without install to our system. The Application server provides access to clients so they can easily interact with web apps.

**Database Server**
The Database server is stores the data about the organization. Here we can store multiple data according to our requirement. We can use multiple servers to store multiple information.

![Database Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18e0iu1jy3tsy1b6yuct.png)

**Game Server**
The Game Server is the server that provides the data about the client while playing the game. The client wants the data about the his health, energy, guns etc. All the information is provided by the Game server.

**Mail Server**
The Mail server provides the data about the mails. It stores the emails and sent the emails to other clients. If we want to sent any mail we have to sent by use of the mail server.

![Mail Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qp8dpaoo3jssjqi6i1k.png)

**Proxy Server**
The Proxy Server improve the performance between the client and server. The different clients will access the same site at a time so it will increase the traffic. So the proxy server will route the traffic into other large network.

**Cloud Server**
The Cloud Server provides the functionality that stores the huge amount of data without having a physical memory. These servers are accessed through the application. If we don't have a memory in the local storage than we buy the cloud storage and use that storage as the server.

## Advantages of servers

- Scalability

- Faster 

- Colaboration of different servers

- Secured