HTTPS, Web Servers

NgInx – What is it?

Back in the day (I’m 52 now but still love to learn new things when I was doing Java Servlet/JSP development, Apache/Tomcat were the servers of choice used to serve up our web applications. Being that I have been primarily doing .NET (and .NET Core) development since 2005, I have been mostly working with IIS. Since then, with the increased popularity of Linux and other open source products that require more and more performance, another “web serving” platform has come along that can work together with Apache or on it’s own to act as a web server. I thought I’d take the plunge and learn more about NgInx as it is used in many of the courses I was taking (with examples on deploying web apps on EC2 instances running Linux) while getting my AWS certifications.

So I enrolled and took a course on NgInx. I may (time permitting) do a youtube outlining what I have learned and what makes it different than Apache.

The wiki definition of NgInx is

“NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.”

To me, NgInx is more flexible than Apache and seems more like an EcoSystem with many various plugins/modules that you can use to customize your platform. NgInx can also be used as a reverse proxy (and usually is in most cases). For example, to serve up PHP pages, you would have the PHP-FPM module running in it’s own process that would receive forwarded http requests from NgInx and then it would return it’s results back to NgInx and NgInx would forward it back onto the client. Apparently, you can have more concurrent connections this way to handle more requests.

I took a course on NgInx, installed and setup a VM running both CentOS and Ubuntu Linux and went to town with NgInx.

Here are some of the features and things I thought were pretty cool that you can do with NgInx:

– Reverse proxy (see above)

– Configure NgInx to load balance requests to whatever IP’s/hosts you configure. Health checks are made constantly (behind) to determine which instances are safe to forward requests to. Also includes the ability to configure “sticky sessions” (ie, whereby a request from a specific IP will always be forwarded to a specific instance that initially served the request).

– Rate Limiting/Throttling. Similar to what you can do with the AWS Api Gateway where you can add a governer switch to control the rate of inbound traffic with full control of granularity (ie, control by IP/Host/app/etc..)

– Easy support/configuration for HTTP2 + handling of SSL and integration with Lets Encrypt

– You can create custom builds of NgInx if you want specific “modules” turned on -or- even if you want to disable certain modules.

And much more.

I may put together a video of some stuff that I learned with it. Having taken the course, I can say NgInx is here to say (it’s increasing in popularity over Apache).

Although it may not be the most “fun” thing for folks out there to learn (when there’s technologies like AWS, Azure, Google, Containers, Orchestrations, etc.), I’d consider it “essential” to know the basics of NgInx and what it can do as I think it’s here to stay. Personally, I had a lot of fun doing a deeper dive into it and have no regrets on doing so.

thanks for reading..

FYI, here’s the course I took. If you follow all of the examples and study the configuration files, etc.., you will learn a lot. I especially appreciated him showing us how to perform custom builds when installing modules (builds is the only way to install new modules).

https://www.udemy.com/nginx-fundamentals/

Leave a comment