What is the relationship between Nginx Tengine openresty?
Tengine is equivalent to Nginx's two development, making some changes that add unique featuresOpenresty is an enhanced version of Nginx that extends a number of modules, featuring the LUA support module and, of course, a very large number of other modules, with the Nginx core using the original Nginx, and the newer mainline version used, For example, the Nginx version contained in 1.9.3.2 is n
1,orange Gateway
Orange is a openresty-based API Gateway. In addition to the basic functions of nginx, it can also be used for API monitoring, access control (authentication, WAF), traffic screening, access speed limit, AB test, dynamic shunt and so on. It has the following characteristics:Provides a set of default dashboard for dynamic management of various functions and configurationsAPI interface for implementing third-party services (such as
The following is based on the Openresty balancer_by_lua configuration directive, which uses Ngx.crc32_long to generate a hash from the source address and destination port to achieve a simple ip_hash upstream. For reference only
Upstream backend{
server 0.0.0.0;
Balancer_by_lua_block {
Local balancer = require "Ngx.balancer"
Local host = {"192.168.1.111", "192.168.1.112"}
Local backend = ""
Local port = ngx.var.
Label: style blog HTTP color ar SP Div on 2014
1. Download the drizzle Module
Wget http://openresty.org/download/drizzle7-2011.07.21.tar.gz
2. Install the drizzle Module
Tar zxvf drizzle7-2011.07.21.tar.gzcd drizzle7-2011.07.21. /configure -- prefix =/usr/local/Drizzle -- without-servermake libdrizzle-1.0make install-libdrizzle-1.0echo "/usr/local/drizzle/lib/">/etc/lD. so. confldconfig
3. Install openresty (refer to my blog http://www.cnblogs.co
: This article describes how to integrate the nginx_tcp module into openresty. if you are interested in the PHP Tutorial, refer to it. Openresty uses http for communication,
However, the project usually requires that the input use the tcp protocol and the output use the http protocol,
In this case, if the input is tcp, the nginx_tcp module is required.
How can I integrate the nginx_tcp module into
: This article describes how to install nginx_lua in [openresty]. if you are interested in the PHP Tutorial, refer to it.
This method is to directly install openresty, instead of re-compiling nginx
Ubuntu installation
Install dependency packages
$ sudo apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make
Soft connection
$ sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /us
BackgroundBefore we statistical domain name status code, average response time and traffic method is: in each machine to add a timed script to get each domain name last minute access log to temporary files. Then Zabbix this one minute log temporary files for the relevant statistics. has been running well, recently found a server suddenly increased load. Use Iotop to see that scripts that get the most recent minute log occupy a particularly high IO. Return to normal after stopping this timed task
Introduction to openresty
Reference: http://openresty.org/cn/index.html
Agentzh (Zhang Yichun)'s openresty open-source project (based on nginx) has greatly expanded the capabilities of nginx through various plug-ins and modules, lua extension can be used to customize complicated business logic. The new features granted by the author to nginx make openresty easi
The openresty itself uses the HTTP protocol to communicate,
However, there are often requirements in the project that the input is using the TCP protocol, the output is using the HTTP protocol,
At this point, the input is the TCP protocol, you need to use the NGINX_TCP module
How do I integrate the NGINX_TCP module into the openresty?
Here's how:
1, download Nginx_tcp_module, address: https://github.c
This article is mainly about the Openresty server using LUA script to write Hello World simple instance, Openresty (also known as Ngx_openresty) is a full-featured Web application server. It packs the standard Nginx core, many of the most commonly used third-party modules, and most of their dependencies, and the friends you need can refer to the
Openresty provid
Dynamically set host with Openresty
Because of the project needs, Nginx Proxy needs to set the Http_host parameters dynamically, the original Nginx does not support, after investigation found that Openresty can achieve: 1. Install Openresty 2. Start Nginx 3. Modify Nginx configuration nginx.conf
Set_by_lua $new _host '
local
1. First install the VMware virtual machine, Baidu search for VMware to install; Baidu searches VMware Workstation 12 keys, such as:5a02h-au243-tzj49-gtc7k-3c61n2. Then download Ubuntu, Address:Https://www.ubuntu.com/download3. Install Ubuntu into the virtual machine and install VMware Tools, as shown in the following tutorial: http://jingyan.baidu.com/article/fc07f98977b60f12ffe5199b.html4. Install the Openresty document, the address is https://openr
==================================================================1. See if Zlib is present in CentOS?Rpm-qa | grep zlibShow:Zlib-devel-1.2.3-29.el6.x86_64Zlib-1.2.3-29.el6.x86_64Indicates that it is installed without worrying too much.====================================================================2. Installing the CMake CompilerYum install-y gcc gcc-c++ make Automakewget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gzTAR-ZXVF cmake-2.8.10.2.tar.gzCD cmake-2.8.10.2./bootstrapGmakeGmak
Premise:
For openresty or Ngx_lua please refer to: http://openresty.org/en/
Problem:
When using Openresty to read data within Redis, Redis is not connected in init_by_lua_file, so sometimes it is only possible to read Redis data in the rewrite or access phase, and what is the way to read it during the initialization phase?
Workaround:
The method of invoking the shell command in the init phase is equiv
==================================================================1. See if Zlib is present in CentOS?Rpm-qa | grep zlibShow:Zlib-devel-1.2.3-29.el6.x86_64Zlib-1.2.3-29.el6.x86_64Indicates that it is installed without worrying too much.====================================================================2. Installing the CMake CompilerYum install-y gcc gcc-c++ make Automakewget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gzTAR-ZXVF cmake-2.8.10.2.tar.gzCD cmake-2.8.10.2./bootstrapGmakeGmak
, but for peers's health check, we only need one worker to execute it, and after one worker executes, the other worker synchronizes its state to be sufficient. In Do_check we see that except for the following Get_lock protected code is performed by one worker, and all the other code is executed by the worker. Timed tasks adopt process preemption, each worker process is not fixed, so the ctx.version is generally discontinuous, through the sharing of memory, you can ensure that each worker process
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.