吃人的孩纸吧 关注:20贴子:980
  • 7回复贴,共1

转贴:nginx负载均衡常用配置

只看楼主收藏回复

负载均衡配置

nginx负载均衡配置 – 运维与架构

来自:www.nginx.cn/78.html



IP属地:浙江1楼2016-04-13 15:51回复
    Nginx基本配置、性能优化指南<转>
    nginx基本配置参考:
    http://www.chinaz.com/web/2015/0424/401323_2.shtml


    IP属地:浙江2楼2016-04-13 16:17
    回复
      Ubuntu下编译安装Keepalived
      复制代码 代码示例:cd /usr
      wget http://www.keepalived.org/software/keepalived-1.2.7.tar.gz
      使用tar命令解压缩:
      复制代码 代码示例:tar zxvf keepalived-1.2.7.tar.gz
      编译之前需要安装几个程序库:
      复制代码 代码示例:apt-get install libssl-dev
      apt-get install openssl
      apt-get install libpopt-dev
      然后运行:
      复制代码 代码示例:./configure --prefix=/usr 得到如下结果:
      http://www.jbxue.com/LINUXjishu/14320.html


      IP属地:浙江3楼2016-04-19 19:54
      收起回复
        nginx+keepalived配置高可用的负载均衡
        ------------------------
        在keepalived中配置nginx监视脚本。
        if [ "$(ps -ef | grep "nginx: master process"| grep -v grep )" == "" ]
        then
        killall keepalived
        ---------------------------------------------
        keepalived (slave) -> nginx ->(loadbance) ->{ apache.tomcat.server1,apache.tomcat.server2}
        keepalived (master)- >nginx ->(loadbance) -> { apache.tomcat.server1,apache.tomcat.server2}
        keepalived(master)一旦宕机或者不可用,跳转到slave,slave的nginx继续作为loadblance服务。
        参考:http://www.jbxue.com/article/2916.html


        IP属地:浙江4楼2016-04-19 20:26
        回复
          关于 tomcat 集群中 session 共享的三种方法
          http://www.cnblogs.com/interdrp/p/4056525.html


          IP属地:浙江5楼2016-04-26 17:15
          收起回复
            乐视分表分库实践 Distributed & HA & Finally Consistent
            乐视秒杀:每秒十万笔交易的数据架构解读
            http://dbaplus.cn/news-21-420-1.html


            IP属地:浙江6楼2016-05-11 10:36
            回复