Intro to Web servers: Nginx

Intro to Web servers: Nginx

Wikipedia defines a Webserver as computer software and the underlying hardware that accepts requests via HTTP, the network protocol created to distribute web pages or its secure variant HTTPS.

To simplify this you can say It's a piece of hardware or software that serves content to users when they request it. Things like websites, blogs, email services are hosted on web servers for user consumption, so any time you type anything.com know that you are accessing a server somewhere to retrieve that information from it.

There are different web servers in the world today and amongst them are ( apache webserver, Nginx web server, internet information services (IIS) web server, etc) but today we will be focusing on Nginx web server. So what is the Nginx web server?

NGINX is open-source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. It started as a web server designed for maximum performance and stability. In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverse proxy and load balancer for HTTP, TCP, and UDP servers. - Nginx

Uses of Nginx

As a reverse proxy
A reverse proxy is a type of server that retrieves resources from one or more servers. the reverse proxy serves the retrieved resources to clients as they request them and does so like it is the main server. It helps reduce the number of requests going to the main server/servers

As a load balancer
A load balancer simply is a server that shares load to other servers to improve resource efficiency and availability by equally allocating load to other servers. Nginx can be configured to act as a load balancer when needed.

As a mail proxy
A proxy is something that acts “as” something else. A mail proxy is a server that acts as a mail server. Nginx can stand as a mail proxy that serves contents on behalf of the mail server. To do so it has to be specially configured.

For HTTP caching
Caching simply means temporarily storing frequently retrieved data to reduce the amount of time it will take to access the data ( latency period ) Nginx can be configured to cache frequently accessed data for a specific period.

In conclusion, the Nginx web server is one of the most used web servers because of its popularity and its functionality, and for good reason.