随笔分类 -  Nginx&Openresty&Lua

摘要:This chapter describes how to configure health checks for TCP. Introduction NGINX and NGINX Plus can continually test your TCP upstream servers, avoid 阅读全文
posted @ 2018-04-02 19:41 大数据从业者FelixZh 阅读(490) 评论(0) 推荐(0)
摘要:This chapter describes how to configure different types of health checks for UDP servers in a load-balanced upstream server group. Prerequisites You h 阅读全文
posted @ 2018-04-02 19:41 大数据从业者FelixZh 阅读(432) 评论(0) 推荐(0)
摘要:This chapter describes how to use NGINX Plus and open source NGINX to proxy and load balance TCP and UDP traffic. Introduction Load balancing refers t 阅读全文
posted @ 2018-04-02 19:40 大数据从业者FelixZh 阅读(1898) 评论(0) 推荐(0)
摘要:This article describes how to configure and use HTTP health checks in NGINX Plus and open source NGINX. Overview NGINX and NGINX Plus can continually 阅读全文
posted @ 2018-04-02 19:39 大数据从业者FelixZh 阅读(939) 评论(0) 推荐(0)
摘要:This chapter describes how to use NGINX and NGINX Plus as a load balancer. Overview Load balancing across multiple application instances is a commonly 阅读全文
posted @ 2018-04-02 19:38 大数据从业者FelixZh 阅读(1130) 评论(0) 推荐(0)
摘要:The ngx_stream_upstream_module module (1.9.0) is used to define groups of servers that can be referenced by the proxy_pass directive. Example Configur 阅读全文
posted @ 2018-04-02 19:29 大数据从业者FelixZh 阅读(2810) 评论(0) 推荐(0)
摘要:–prefix=<path> – Nginx安装路径。如果没有指定,默认为 /usr/local/nginx。 –sbin-path=<path> – Nginx可执行文件安装路径。只能安装时指定,如果没有指定,默认为<prefix>/sbin/nginx。 –conf-path=<path> – 阅读全文
posted @ 2018-04-02 10:33 大数据从业者FelixZh 阅读(893) 评论(0) 推荐(0)
摘要:正常情况下,nginx进程状态如下: 当修改配置文件,reload之后: PID=17114的wroker有正在处理的连接,等处理结束,该worker就会退出(退出之前,该worker不会处理新的连接): 阅读全文
posted @ 2018-03-29 16:40 大数据从业者FelixZh 阅读(11671) 评论(0) 推荐(0)
摘要:Nginx除了以前常用的HTTP负载均衡外,Nginx增加基于TCP协议实现的负载均衡方法。 HTTP负载均衡,也就是我们通常所有“七层负载均衡”,工作在第七层“应用层”。而TCP负载均衡,就是我们通常所说的“四层负载均衡”,工作在“网络层”和“传输层”。例如,LVS(Linux Virtual S 阅读全文
posted @ 2018-01-29 14:31 大数据从业者FelixZh 阅读(23195) 评论(0) 推荐(1)
摘要:Nginx 在1.9.0版本发布以前如果要想做到基于TCP的代理及负载均衡需要通过打名为 nginx_tcp_proxy_module 的第三方patch来实现,该模块的代码托管在github上网址:https://github.com/yaoweibin/nginx_tcp_proxy_modul 阅读全文
posted @ 2018-01-29 14:15 大数据从业者FelixZh 阅读(1281) 评论(0) 推荐(0)
摘要:nginx tcp代理功能由nginx_tcp_proxy_module模块提供,同时监测后端主机状态。该模块包括的模块有: ngx_tcp_module, ngx_tcp_core_module, ngx_tcp_upstream_module, ngx_tcp_proxy_module, ngx 阅读全文
posted @ 2018-01-29 09:54 大数据从业者FelixZh 阅读(701) 评论(0) 推荐(0)
摘要:http://blog.sina.com.cn/s/blog_e59371cc0102ux5w.html 最近工作中遇到一个问题,想把它记录下来,场景是这样的: 从上图可以看出,用户通过Client访问的是LVS的VIP, VIP后端挂载的RealServer是Nginx服务器。 Client可以是 阅读全文
posted @ 2018-01-25 15:08 大数据从业者FelixZh 阅读(6916) 评论(0) 推荐(2)
摘要:1. /usr/local/nginx/sbin/nginx -V 查看nginx版本与编译安装了哪些模块nginx version: nginx/1.10.3built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)built with OpenSSL 阅读全文
posted @ 2018-01-19 13:43 大数据从业者FelixZh 阅读(1277) 评论(0) 推荐(0)
摘要:user nobody; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error 阅读全文
posted @ 2017-04-08 11:13 大数据从业者FelixZh 阅读(765) 评论(0) 推荐(0)
摘要:Nginx("engine x")是一款是由俄罗斯的程序设计师Igor Sysoev所开发高性能的 Web和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 在高连接并发的情况下,Nginx是Apache服务器不错的替代品。 Nginx("engine x")是一款是由俄罗斯 阅读全文
posted @ 2017-01-13 19:52 大数据从业者FelixZh 阅读(669) 评论(0) 推荐(0)
摘要:使用Memcache <br\>Memcache是一个通用的内存缓存系统。 它通常用于加速缓慢的数据访问。 NGINXmemcached模块提供各种指令,可以配置为直接访问Memcache提供内容,从而避免对上游服务器的请求。除了指令之外,模块还创建$ memcached_key变量,用于执行高速缓 阅读全文
posted @ 2017-01-13 19:50 大数据从业者FelixZh 阅读(2501) 评论(0) 推荐(0)
摘要:定义缓存目录 <br\>使用您喜欢的文本编辑器打开/etc/nginx/nginx.conf,并在http {区域加入: proxy_cache_path /var/www/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive= 阅读全文
posted @ 2017-01-13 19:46 大数据从业者FelixZh 阅读(4105) 评论(0) 推荐(0)
摘要:启用FastCGI缓存 <br\>编辑必须启用缓存的虚拟主机配置文件。 nano /etc/nginx/sites-enabled/vhost 将以下行添加到server{}指令之外的文件顶部: fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_ 阅读全文
posted @ 2017-01-13 19:44 大数据从业者FelixZh 阅读(5550) 评论(1) 推荐(0)
摘要:NGINX虽然已经对静态内容做过优化。 但在高流量网站的情况下,仍然可以使用open_file_cache进一步提高性能。 NGINX缓存将最近使用的文件描述符和相关元数据(如修改时间,大小等)存储在缓存中。 缓存不会存储所请求文件的内容。 open_file_cache 启用此指令将存储以下信息的 阅读全文
posted @ 2017-01-13 19:36 大数据从业者FelixZh 阅读(2569) 评论(0) 推荐(0)
摘要:请求缓冲区在NGINX请求处理中起着重要作用。 在接收到请求时,NGINX将其写入这些缓冲区。 这些缓冲区中的数据可作为NGINX变量使用,例如$request_body。 如果缓冲区与请求大小相比较小,则数据将写入磁盘上的文件,因此将涉及I/O操作。 NGINX提供了可以改变请求缓冲区的各种指令。 阅读全文
posted @ 2017-01-13 18:58 大数据从业者FelixZh 阅读(36234) 评论(0) 推荐(3)

大数据从业者