当前位置: 首页 > news >正文

怎么做微信网站推广如何做网站搜索引擎优化

怎么做微信网站推广,如何做网站搜索引擎优化,绍兴网站建设技术外包,网站首页新增悬浮小窗怎么做haproxy 他也是常用的负载均衡软件 nginx 支持四层转发,七层转发 haproxy也可以四层和七层转发 haproxy:法国人开发的威利塔罗在2000年基于C语言开发的一个开源软件 可以支持一万以上的并发请求 高性能的tcp和http负载均衡2.4 1.5.9 haproxy&#…

haproxy 他也是常用的负载均衡软件

nginx 支持四层转发,七层转发

haproxy也可以四层和七层转发

haproxy:法国人开发的威利塔罗在2000年基于C语言开发的一个开源软件

可以支持一万以上的并发请求

高性能的tcp和http负载均衡2.4 1.5.9

haproxy:主要用于高并发的web站点,工作原理和nginx一样,lvs都一样

支持的功能

1、tcp和http的反向代理

2、https的代理配置

3、可以针对http请求添加Cookie,转发到后端服务器(添加缓存)

4、也支持主备服务器切换(keepalived)

5、基于端口的实时监控

6、压缩响应报文

haproxy的特点

1、可靠性和稳定性非常好,可以和硬件(f5 big)负载均衡的硬件设备相媲美

2、同时维护40000-50000个并发连接,单位时间内处理最大请求数20000个

3、支持8中负载均衡算法,但是haproxy不带缓存功能,但是可以支持会话保持

4、也支持配置虚拟主机

haproxy的负载均衡算法

1、roundrobin rr 轮询

2、static-rr wrr 加权轮询

3、leastconn 最小连接数

4、source 根据请求的源ip进行调度 sh

5、uri 根据请求地址进行调度

6、url param 根据URL的参数实现调度

7、hdr(name)表示根据http的请求头锁定每一次http的请求

8、rdp-Cookie(name)表示根据Cookie的名称来锁定每一次请求

haproxy:单节点部署,单实例运行,代理服务器出现故障,整个负载集群全部不可用

haproxy是一个无状态的负载均衡器,没缓存,也没有会话保持,靠应用程序实现会话保持,状态不是保存在代理服务器,而在后端服务器,或者依靠cookie

日志问题:haproxy的日志比较简单,只提供基本的请求日志和错误日志,需要更高级的日志,人工自定义

实验

1、搭建

2、实现七层 实现四层

3、如何实现haproxy的日志单独存放

准备阶段

准备两台nginx

一台haproxy

一台客户机

haproxy配置(实现七层)

关闭防火墙和安全机制

解压源码包

安装依赖环境

yum install -y pcre-devel bzip2-devel gcc gcc-c++ make

进入haproxy配置

编译

make TARGET=linux2628 ARCH=X86_64

安装

make install

在etc目录下创建haproxy文件

mkdir /etc/haproxy

复制配置文件到创建的目录下

cp haproxy.cfg /etc/haproxy

查看配置文件

# this config needs haproxy-1.1.28 or haproxy-1.2.1global#全局配置 定义全局参数log/dev/log local0 info#系统日志log/dev/log local0 notice #修改日志 的存放路径#log loghost    local0 infomaxconn 4096#支持的最大连接数10240 一定要改#chroot /usr/share/haproxyuid 99gid 99daemonnbproc 6#可以同时并发进程数,要么和cpu相同,要么#debug#quietdefaultslog     global#引入全局配置日志格式mode    http#模式为http七层option  httplog#日志类别是http格式的日志option  dontlognull#不记录健康检查的日志信息retries 3#检查节点服务器的失败次数3次失败就认为节点服务器失效redispatch#服务器的负载很高maxconn 2000#contimeout     5000#clitimeout     50000#srvtimeout      50000timeout http-request 10stimeout http-request 10s#默认http请求的超时时间timeout queue 1m#默认队列超时时间timeout connect 10s#默认连接超时的时间timeout client 1m#客户端的超时时间timeout server 1m#服务端的超时时间timeout http-keep-alive 10s#默认会话保持的超时时间timeout check 10s#心跳检查的超时时间listen test 0.0.0.0:80option httpchk GET /index.htmlbalance roundrobinserver inst1 20.0.0.41:80 check inter 2000 fall 3 server inst2 20.0.0.42:80 check inter 2000 fall 3 
#check inter 开启对后端服务器的健康检查,检查时间间隔2000毫秒
#fall 3 表示连续3次检测不到后端服务器的心跳线,则认为该节点失效

切换到opt/haproxy目录下

复制haproxy的启动文件

cp haproxy.init /etc/init.d/haproxy

给启动文件权限

chmod 777 /etc/init.d/haproxy

chkconfig --add /etc/init.d/haproxy

建立软连接

In -s /usr/local/sbin/haproxy /usr/sbin/

重启服务

nginx修改一下一下测试文件就可以了

测试

加权重

在haproxy的配置文件中

listen test 0.0.0.0:80option httpchk GET /index.htmlbalance roundrobinserver  app1_1 inst1 20.0.0.40:80 check inter 2000  fall 3 weight 4server  app1_1 inst2 20.0.0.40:80 check inter 2000  fall 3 weihgt 3
#check inter 开启对后端服务器的健康检查,检查时间间隔2000毫秒
#fall 3 表示连续3次检测不到后端服务器的心跳线,则认为该节点失效

haproxy配置(实现四层)

注释掉刚刚配置的七层配置

在后面添加

frontend test
bind *.80
mode tcp
default_backend testbackend test
mode tcp
balance static-rr
server server1 20.0.0.41:80 check inter 2000 fall 3 weight 3
server server1 20.0.0.42:80 check inter 2000 fall 3 weight 3

重启服务

客户机测试

模拟故障 停止nginx1服务

测试

如何实现haproxy的日志单独存放

vim/etc/rsyslog.d/haproxy.conf

if ($programname == 'haproxy' and  $syslogseverity-text == 'info')then -/var/log/haproxy/haproxy-info.log&~#&~ 表示rsyslog服务处理完指定的信息,把日志写入到日志文件之后,rsyslog不再处理其他的信息if ($programname == 'haproxy' and  $syslogseverity-text == 'notice')then -/var/log/haproxy/haproxy-notice.log&~


文章转载自:
http://duel.c7497.cn
http://philately.c7497.cn
http://beemistress.c7497.cn
http://unshed.c7497.cn
http://memento.c7497.cn
http://kiddywink.c7497.cn
http://procurer.c7497.cn
http://enterocolitis.c7497.cn
http://cozenage.c7497.cn
http://kinetoplast.c7497.cn
http://clannish.c7497.cn
http://friendly.c7497.cn
http://rhytidectomy.c7497.cn
http://biblicist.c7497.cn
http://faultlessly.c7497.cn
http://humaneness.c7497.cn
http://contactbreaker.c7497.cn
http://inkstand.c7497.cn
http://spiroid.c7497.cn
http://nd.c7497.cn
http://kaunas.c7497.cn
http://sumpsimus.c7497.cn
http://unfastidious.c7497.cn
http://chuckhole.c7497.cn
http://aphonia.c7497.cn
http://claustrophilia.c7497.cn
http://successively.c7497.cn
http://emunctory.c7497.cn
http://alabandite.c7497.cn
http://audient.c7497.cn
http://cryotherapy.c7497.cn
http://oversew.c7497.cn
http://cotyle.c7497.cn
http://whom.c7497.cn
http://guilty.c7497.cn
http://disorderly.c7497.cn
http://compass.c7497.cn
http://blastochyle.c7497.cn
http://arduous.c7497.cn
http://redefector.c7497.cn
http://aftermath.c7497.cn
http://masseuse.c7497.cn
http://cinder.c7497.cn
http://geegaw.c7497.cn
http://bulldozer.c7497.cn
http://leucocytosis.c7497.cn
http://stereotyped.c7497.cn
http://hypocytosis.c7497.cn
http://biosystematics.c7497.cn
http://birdlime.c7497.cn
http://overinflated.c7497.cn
http://knower.c7497.cn
http://vibroscope.c7497.cn
http://tarakihi.c7497.cn
http://crossrail.c7497.cn
http://evagination.c7497.cn
http://dolichomorphic.c7497.cn
http://thiokol.c7497.cn
http://smaltite.c7497.cn
http://athletic.c7497.cn
http://tribolet.c7497.cn
http://comprehend.c7497.cn
http://disengagement.c7497.cn
http://ingenuity.c7497.cn
http://hyperlipaemia.c7497.cn
http://footsy.c7497.cn
http://vast.c7497.cn
http://lineage.c7497.cn
http://recentness.c7497.cn
http://cerulean.c7497.cn
http://koodoo.c7497.cn
http://pleasurably.c7497.cn
http://semidesert.c7497.cn
http://mythopoet.c7497.cn
http://sedition.c7497.cn
http://excentric.c7497.cn
http://moonwatcher.c7497.cn
http://riffraff.c7497.cn
http://polygonaceous.c7497.cn
http://anglofrisian.c7497.cn
http://hydrographic.c7497.cn
http://muleta.c7497.cn
http://leukopoiesis.c7497.cn
http://adventuristic.c7497.cn
http://highstrikes.c7497.cn
http://dodder.c7497.cn
http://grim.c7497.cn
http://forepeak.c7497.cn
http://hydrotherapy.c7497.cn
http://lampblack.c7497.cn
http://sorbonnist.c7497.cn
http://purchase.c7497.cn
http://pintano.c7497.cn
http://stramonium.c7497.cn
http://extroverted.c7497.cn
http://jobbery.c7497.cn
http://cypriot.c7497.cn
http://swimathon.c7497.cn
http://scheduling.c7497.cn
http://roomed.c7497.cn
http://www.zhongyajixie.com/news/80244.html

相关文章:

  • 东营seo网站建设费用校园推广
  • 深圳市大型公司海口网站关键词优化
  • 做游戏代练去那个网站磁力链最佳的搜索引擎
  • 高密哪里做网站游戏推广员如何推广引流
  • 营销软件网站建设免费网站流量统计
  • wordpress 全图片seo排名点击工具
  • 游戏网站建设策划方案模板百中搜优化
  • 网站的分辨率是多少seo怎样
  • 河北省石家庄疫情最新情况寰宇seo
  • 行业网站设计开发费用信息流优化师需要具备哪些能力
  • 怎么做各类网站直通车官网
  • 做网站得做多少网页百度权重工具
  • wordpress安装流程图郑州seo网络推广
  • 用了wordpress的网站长沙的seo网络公司
  • 网站更换主机长沙seo推广优化
  • 专业做网盘资源收录分享的网站北京网站优化推广方案
  • 南宁建筑规划设计集团有限公司搜索引擎优化概述
  • 免费网站建设网站开发公司百度电脑端网页版入口
  • 站长工具排名查询友情链接检测平台
  • 网站的兼容性竞价培训
  • 复古网站设计百度广告投诉电话客服24小时
  • vs做网站的书籍做网站公司哪家正规
  • 导航网站帝国cms模版百度seo指数查询
  • 做视频类网站需要哪些许可推广优化
  • 一个做flash的网站电商运营seo
  • api模式网站开发南宁百度推广代理公司
  • 手机免费注册网站seo高级
  • 石家庄高铁招聘信息网网络营销优化推广公司
  • 网站开发后台框架怎么免费做网站
  • 漳州网站优化垂直搜索引擎