zoukankan      html  css  js  c++  java
  • nginx 代理tcp长连接短连接配置

    https://blog.csdn.net/tayinyinyueyue/article/details/78932697

    nginx使用ngx_stream_core_module模块代理tcp长连接短连接,可以增强服务器的容灾能力

    下面是一个配置信息,自己也方便记录一下

    1. tcp {  
    2.     timeout 1d;  
    3.     proxy_read_timeout 10d;  
    4.     proxy_send_timeout 10d;  
    5.     proxy_connect_timeout 30;  
    6.   
    7.     upstream tcpend {  
    8.         server 192.168.1.55:7778;  
    9.         server 192.168.1.58:7778;  
    10.         check interval=60000 rise=2 fall=5 timeout=10000 type=tcp;  
    11.     }  
    12.   
    13.     server {  
    14.         server_name  192.168.1.56;  
    15.         listen 192.168.1.56:7777;  
    16.         proxy_pass tcpend;  
    17.         so_keepalive on;  
    18.         tcp_nodelay on;  
    19.     }  
    20. }  

  • 相关阅读:
    字符串方法
    文件上传路径转虚拟路径
    表结构转excel
    @ModelAttribute
    select
    查询详情在模态框展示
    时间
    mybatis一对多
    bootstrap tab页
    为什么不建议使用WordPress呢?
  • 原文地址:https://www.cnblogs.com/cheyunhua/p/8807161.html
Copyright © 2011-2022 走看看