August 2017
Intermediate to advanced
278 pages
8h 53m
English
To use TCP load balancing, we first need to double-check whether the NGINX version has the stream module compiled. To do this, you can run the following command:
nginx -V
This will generate an output, displaying all of the compiled modules. The stream module is available if you see --with-stream in the output. Consider this example:

If you don't have the required version, we covered how to install an updated version in Chapter 1, Let's Get Started.
Next, we need to define a stream block directive, which must be situated outside of the HTTP block directive or replace it altogether. Unlike previous examples, where this could ...
Read now
Unlock full access