The upstream module

Closely paired with the proxy module is the upstream module. The upstream directive starts a new context in which a group of upstream servers is defined. These servers may be given different weights (the higher the weight, the greater the number of connections NGINX will pass to that particular upstream server), may be of different types (TCP versus UNIX domain), and may even be marked as down for maintenance reasons.

The following table summarizes the directives valid within the upstream context:

The upstream module directives

Explanation

ip_hash

This directive ensures the distribution of connecting clients evenly over all servers by hashing the IP address, keying on its class-C network.

keepalive

This directive specifies ...

Get Mastering NGINX - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.