optimize the utilization of resources to maximize throughput, reduce wait time, and ensure fault tolerance.
Nginx can be used as an extremely efficient HTTP load balancer to distribute traffic to multiple application servers to improve performance, scalability, and availability.
2. Load Balancing method
Nginx supports the following load balancing mechanisms:
[……]
Read the full text
Classification: Nginx labels: loadbance, nginx, and server load balancer
Install
;[......]
Read the full text
Category: Nginx Tags: Nginx, redirect
Using Nginx as HTTP load balancer
September 28, 2014 north of tacitly
1. Introduction
In many applications, load balancing is a common technique to optimize the use of resources to maximize throughput, reduce latency, and ensure fault tolerance.
You can use Nginx as a very efficient HTTP load balancer to allocate traffic to multiple application servers for improved performance, scalability, and high availability.
=192.168.1.50:22122Store_path0=/data/fdfsModify the configuration file for the group2 storageRun_by_group=fastdfsRun_by_user=fastdfsGroup_name=group2Base_path=/data/fdfstracker_server=192.168.1.51:22122Store_path0=/data/fdfs 2.2.4 Start StorageExecute the start storage command on 61 and 67 servers respectively:sudo/usr/bin/fdfs_storaged/etc/fdfs/storage.conf startAfter the storage is properly started, you need to create a connection. On 61 and 67 servers, respectively, execute the command:sudo l
Echo-nginx-module is a third-party module, not in Nginx source code, but in Openresty, it brings echo,sleep,time and other powerful commands like bash for nginx.conf.
Currently the latest version is v0.61
Installation Guide SeeHttps://github.com/openresty/echo-nginx-module#installationConfiguration
server {
listen 8081;
server_name localhost;
location/test {
set
Because I like the Lua language very much, and work is web development, so I have been concerned about the Web server project of Lua, including Xavante, Alilua, Openresty, tengine, etc. Xavante was the first I touched, The concept was not blocked at the time, it is now known to be blocked, the use of LUA in a single thread will have performance problems, and there is no file upload, websocket and other functions. Alilua,
In the previous article, "High concurrency system limited-current stunt", the current limit algorithm, application-level current limit, and distributed current limit are introduced in this paper. The Access layer current limit implementation is described.
Access Layer Current limit
Access layer usually refers to the entrance of the request traffic, the main purpose of this layer is: load balancing, illegal request filtering, request aggregation, cache, downgrade, current limit, A/B testing, qual
This part should be introduced at the very beginning, but I think it will be more profound to look back on the configuration after I have some knowledge of Kong. Next, make a detailed explanation of the parameters in this configuration file to facilitate better use or optimization of the Kong Gateway.Directory
I. Configuration loading
Two. Verifying the configuration
Three. Environment variables
Four. Custom Nginx configuration Embedded Kong configuration
1. Install drizzle1.0:
wget HTTP://AGENTZH.ORG/MISC/NGINX/DRIZZLE7-2011.07.21.TAR.GZCD drizzle7-2011.07.21/./configure--without-server Make Libdrizzle-1.0make install-libdrizzle-1.0Modify/etc/profile, add the following two lines, or directly execute the following two sentences
Export Libdrizzle_inc=/usr/local/include/libdrizzle-1.0export Libdrizzle_lib=/usr/local/lib
2. Download and unzip Rds-json-nginx-module
wget https://github.com/openresty/rds
First of all, thanks to the openresty of Zhangyi, we have solved some pain points of web development and simplified the complexity of web development.
Demand:
According to a URL of a parameter, do load balancing, so that a user is always assigned to a fixed Business Server processing, convenient for subsequent business processing, caching or cell-structured deployment
Suppose this parameter is Dvid, a total of two business servers, 8088 ports and 8089
Referencehttp://blog.csdn.net/vboy1010/article/details/7892120Http://www.zhangjixuem.com.cn/2014/4/1/01037.htmlHttps://github.com/bigplum/lua-resty-mongolInstallation:Download ngx_openresty-1.7.2.1.tar.gz./configure--prefix=/data/nginx/openresty/resty--with-luajitMakeMake installModify Nginx.confNote Default_type Text/plain;Otherwise the browser trigger is downloadedCharSet UTF-8,GBK;Otherwise it might be garbled. Java code worker_processes1; events{
: This article mainly introduces the common nginx extension installation. if you are interested in the PHP Tutorial, refer to it. 1. install drizzle1.0:
wget http://agentzh.org/misc/nginx/drizzle7-2011.07.21.tar.gzcd drizzle7-2011.07.21/./configure --without-server make libdrizzle-1.0make install-libdrizzle-1.0Modify/etc/profile, add the following two lines, or directly execute the following two sentences
export LIBDRIZZLE_INC=/usr/local/include/libdrizzle-1.0export LIBDRIZZLE_LIB=/usr/local/l
the AWS instance is running and whether the Thin server is running on the instance.
Deploy Nginx proxy system for access control
To simplify this step, we recommend that you install an excellent OpenResty Web application, which is basically bundled with the standard Nginx core and almost all the necessary third-party Nginx built-in modules.
Install dependencies: sudo apt-get install libreadline-dev libncurses5-dev perl
Compile and install Nginx:
• Cd
]# make make install[[email protected] etc]# Vim php.ini Modify configuration fileReload ServiceCopy filesView ports[Email protected] html]# vim example.php[Email protected] html]# vim memcache.php(MySQL, memcached, PHP, PHP-FPM, client-, Nginx)Liu, OpenrestyOpenresty? is based on a Nginx A high-performance Web platform with LUA that integrates a large number of sophisticated Lua libraries, third-party modules, and most of the dependencies. For easy building of dynamic Web applications, Web ser
CTRL + V CTRL + A, followed by "^a" for Invisible characters 0x01), in the following format:Time ^aip^a Domain name ^aurl^a page Title ^areferrer^a Resolution High ^a resolution wide ^a color depth ^a language ^a client Information ^a user identification ^a site identificationBack-end scriptsIn order to be simple and efficient, I intend to use Nginx Access_log to do log collection, but there is a problem is nginx configuration itself logical expression ability is limited, so I chose
The memc-nginx-module is applicable to some pages with high access volumes, especially systems with high instantaneous access Volumes. jetty cannot support requests, in this case, the memc-nginx-module and the srcache-nginx-module can be used to store the request page data in memcached, which can greatly improve the system's concurrency capability. Memc-nginx-module installation due to the use scenario of the angent memc-nginx-module
Jetty is unable to support requests for pages with large traff
course not, My goal is to replace the content of the page. For example, insert JS, modify a text, and so on. Configuration of the ClientBecause I do not have a router in the company, directly use the client to do the test, the client's DNS gets the source or the router .650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/77/EE/wKioL1ZxVbqSehVZAAAfc5KpWQY299.png "title=" 8.png " alt= "Wkiol1zxvbqsehvzaaafc5kpwqy299.png"/>This time the configuration succeeds, you can open baidu.com to test
HTTP, but so many processes naturally lead to high overall machine load.But even if we use multiple Django processes to handle HTTP requests, Python still can't handle some of the extra requests. So we use Openresty to implement high-frequency HTTP requests using LUA. This in turn leads to the use of two development languages, and some logic has to write two different codes.
Synchronous Network ModelThe Django Network is a synchronous block, that is
This problem occurs when Openresty accesses the first page of the root directory as a Web server:Configuration of Nginx side:1Worker_processes 2;2Error_log Logs/error.log;3 4 Events {5Worker_connections 1024;6 }7 8 http {9 server {TenListen 8080; One server_name localhost; A -Location/ { - index index index.html index.htm; theRoot/usr/local/openresty/nginx/work; - - } -Locati
Today I learned about the Lua-resty-upload module, and based on the Lua-resty-upload module simple implementation of a basic form file upload service.Lua-resty-upload's project address on GitHub is: https://github.com/openresty/lua-resty-uploadFrom the implementation can be seen, in fact, the implementation of upload service is relatively simple, a source file Lualib/resty/upload.lua, the total number of lines of code is only 300 lines.Below I have or
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.