NGINX Unit 1.17.0 Application Server Release

Took place application server release NGINX Unit 1.17, which develops a solution to ensure the launch of web applications in various programming languages ​​(Python, PHP, Perl, Ruby, Go, JavaScript / Node.js and Java). Under the control of NGINX Unit, several applications in different programming languages ​​can run simultaneously, the launch parameters of which can be changed dynamically without the need to edit configuration files and restart. The code is written in C language and spreads licensed under Apache 2.0. You can get acquainted with the features of NGINX Unit in announcement first release.

In the new version:

  • Possibility using "return" and "location" expressions in "action" blocks to immediately return an arbitrary return code or redirect to an external resource. For example, to deny access to URIs that match the "*/.git/*" mask or redirect to a host with www, you can use the following settings:

    {
    "match": {
    "uri": "*/.git/*"
    },

    "action": {
    "return": 403
    }
    }

    {
    "match": {
    "host": "example.org",
    },

    "action": {
    "return": 301,
    "location": "https://www.example.org"
    }
    }

  • Support for fractional server weights in blocks "upstream". For example, a design with integer weights, which implies redirecting to 192.168.0.103 half as many requests as for the others:

    {
    "192.168.0.101:8080": {
    "weight": 2
    },
    "192.168.0.102:8080": {
    "weight": 2
    },
    "192.168.0.103:8080": { },
    "192.168.0.104:8080": {
    "weight": 2
    }
    }

    can now be reduced to a simpler and more logical form:

    {
    "192.168.0.101:8080": { },
    "192.168.0.102:8080": { },
    "192.168.0.103:8080": {
    "weight": 0.5
    },
    "192.168.0.104:8080": { }
    }

  • Fixed problems with building in DragonFly BSD;
  • Fixed a bug that led to the output of code 502 β€œBad Gateway” under high load;
  • Fixed a memory leak in router that appeared starting from release 1.13.0;
  • Incompatibilities with some Node.js applications have been resolved.

Source: opennet.ru

Add a comment