In this hands-on demo and lab, we take you step-by-step through installing NGINX Unit on a Linux system, then configuring it as an app server, web server, and reverse proxy. Following a short review of production features and demo of the lab environment, we let you loose in a disposable lab environment to try NGINX Unit for yourself. During the lab, we’re available online to answer questions or demo anything you might be stuck on.
Run through what we are going to do, talk about the labs and duration
So let’s talk about NGINX and NGINX Unit – because they are not the same thing. I expect most of you will be aware of NGINX ##. NGINX is our well known web server and reverse proxy. NGINX is available in both open source and commercial versions and offers features like ## reverse proxy, load balancing, web serving, application layer firewall capabilities and api gateway capabilities.
But we are not talking about that today. Today we are talking about NGINX Unit ##. Nginx Unit is a different piece of software that provides the application server runtime environment for your web applications. ## this is where your application code is going to run. NGINX unit offers a highly configuratle, lightweight and isolated runtime environment where multiple applications using different languages can run on the same platform.
So what can unit do? Well first ## it can run on most unix-like operating systems, with binaries available for popular LINUX distributions, container images, and of course the ability to build from source. Next ## it can route application requests as the come in – based on, well, all the things you might expect, hostname, path, cookies etc.
Route to where? ## Well just like NGINX, Unit can serve static content. This might be useful for images, media etc. More commonly the target will be an application ##. We will cover installing a language module and a sample application in the lab. Of course Unit might not be able to handle every request, so also has the ability to proxy requests to external services, and even load balance across them.
And of course, like any moderna platform, we can manage the TLS/SSL layer so that your application traffic is encrypted
Unit supports a lot of languages ## and even more frameworks ## Today we will install just one language, but you can have multiple languages (and even multiple versions of the same language) running on unit, all the installation instructions for languages are on the unit website.
Here are the major configuration items and directives – first we have a listener##. Which defines an address and port to listen on, at a minimum. Wildcards are supported, Listeners are also where TLS is configured
A listener can pass traffic to an application, an upstream (an external service), or most commonly a route
A route is where we can use some logic to take action. We can share static content, pass traffic to an application, or an upstream server, and even return simple content directly from the route.
##Upstreams are configured in a similar way to NGINX – although if your primary use case is a reverse proxy load-balancer, then NGINX is currently a better choice then Unit.
If this all sounds good, you might be wondering how to configure unit to do all this stuff.
##Unit is configured by a REST API, with the configuration data in a JSON payload
You can use any tools you like to make the HTTP requests ##
##And any language that can send a request
## The format is simple and easy to read. Today we will just be using text files and curl to make configuration changes.
OK, nearly time for the lab, lets give you a quick run through and a very short demo of the lab.
Talk hrough the points
Once you start the lab, each challenge will give you a screen like this . It ‘s very easy to navigate. ## there is a shell, and some times another tab for an application
## the instructions to follow are on the right, and you can resize and easily copy commands. The sections expand to make it easier to get a lot on one page.
Once you have completed a challenge in the lab, click the ‘check’ button to see if it’s complete.
PLEASE – click ‘finish’ to end the lab, and give feedback.
OK, I’m going to put the link for the lab in the chat now.