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

乐清微网站建设网站seo推广优化

乐清微网站建设,网站seo推广优化,谷歌seo什么意思,网站底部制作HAProxy 高级功能 介绍 HAProxy 高级配置及实用案例 压缩功能 对响应给客户端的报文进行压缩,以节省网络带宽,但是会占用部分CPU性能 建议在后端服务器开启压缩功能,而非在HAProxy上开启压缩 注意:默认Ubuntu的包安装nginx开…

HAProxy 高级功能

介绍 HAProxy 高级配置及实用案例

压缩功能

对响应给客户端的报文进行压缩,以节省网络带宽,但是会占用部分CPU性能

建议在后端服务器开启压缩功能,而非在HAProxy上开启压缩

注意:默认Ubuntu的包安装nginx开启压缩功能

配置选项

compression algo  <algorithm> ...           #启用http协议中的压缩机制,常用算法有gzip,deflate#压缩算法<algorithm>支持下面类型:identity                                  #debug调试使用的压缩方式gzip                                      #常用的压缩方式,与各浏览器兼容较好deflate                                   #有些浏览器不支持raw-deflate                               #新式的压缩方式
compression type <mime type> ...            #要压缩的文件类型MIME#示例:
compression algo gzip deflate
compression type compression type text/plain text/html text/css text/xml text/javascript application/javascript

配置示例

listen  web_hostbind 10.0.0.7:80mode httpbalance  roundrobinlog globaloption httplogcompression algo gzip deflate   #启用压缩和指定算法compression type compression type text/plain text/html text/css text/xml text/javascript application/javascript    #指定压缩文件类型         server web1 10.0.0.17:80  cookie web1 check inter 3000 fall 3 rise 5server web2 10.0.0.27:80  cookie web2 check inter 3000 fall 3 rise 5#后端服务器准备一个文本文件
[root@web01 html]#ll -h
total 1.2M
-rw-r--r-- 1 nginx nginx 1.2M Nov 12 18:08 1.txt

验证压缩功能

--compressed:这个选项告诉 curl 请求服务器发送压缩的响应(如果服务器支持的话)。通常,服务器会使用 gzip 或 deflate 算法压缩数据以减少传输时间。[root@master-db ~]#curl -b /root/cookie.txt 172.16.1.211/1.txt -Iv --compressed 
* About to connect() to 172.16.1.211 port 80 (#0)
*   Trying 172.16.1.211...
* Connected to 172.16.1.211 (172.16.1.211) port 80 (#0)
> HEAD /1.txt HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 172.16.1.211
> Accept: */*
> Accept-Encoding: deflate, gzip
> Cookie: WEBSRV=web01

没开启压缩功能前

 

开启压缩功能后

后端服务器健康性监测

三种状态监测方式

基于四层的传输端口做状态监测,此为默认方式
基于指定 URI 做状态监测,需要访问整个页面资源,占用更多带宽
基于指定 URI 的 request 请求头部内容做状态监测,占用较少带宽,建议使用此方式 

基于应用层http协议进行健康性检测

基于应用层http协议,采有不同的监测方式,对后端real server进行状态监测

注意: 此方式会导致在后端服务器生成很多的HAProxy发起的访问日志

option httpchk    #支持Listen和backendf块,启用七层健康性检测,对tcp 和 http 模式都支持,默认为:OPTIONS / HTTP/1.0,nginx默认不支持OTIONS
option httpchk <uri>
option httpchk <method> <uri>
option httpchk <method> <uri> <version>
#期望以上检查得到的响应码
http-check expect [!] <match> <pattern>
#示例:
http-check expect status 200
http-check expect ! rstatus ^5 #支持正则表达式
#关于HTTP/1.1的说明
<version> is the optional HTTP version string. It defaults to "HTTP/1.0" but 
some servers might behave incorrectly in HTTP 1.0, so turning it to HTTP/1.1 may 
sometimes help. Note that the Host field is         mandatory in HTTP/1.1, and 
as a trick, it is possible to pass it after "\r\n" following the version string.

配置示例

listen  web_hostbind 10.0.0.7:80mode httpbalance  roundrobin#option httpchk GET /monitor/check.html               #默认HTTP/1.0#option httpchk GET /monitor/check.html HTTP/1.0#option httpchk GET /monitor/check.html HTTP/1.1      #注意:HTTP/1.1强制要求必须有Host字段option httpchk HEAD  /monitor/check.html HTTP/1.1\r\nHost:\ www.wang.org #使用HEAD减少网络流量,新版不支持\r\nHost:\ www.wang.orghttp-check send hdr Host www   #注意:新版要求:HTTP/1.1强制要求必须有Host字段cookie  SERVER-COOKIE  insert  indirect nocacheserver web1 10.0.0.17:80  cookie web1 check inter 3000 fall 3 rise 5server web2 10.0.0.27:80  cookie web2 check inter 3000 fall 3 rise 5#在所有后端服务建立检测页面
[root@backend ~]#mkdir /var/www/html/monitor/[root@backend ~]#echo  monitor > /var/www/html/monitor/check.html#关闭一台Backend服务器
[root@backend1 ~]#systemctl stop httpd

验证http监测

查看到状态页,可以看到启用了七层检测功能:LastChk字段:L7  

listen www.web01.combalance roundrobinbind 0.0.0.0:80log globaloption httplogoption httpchk HEAD  / HTTP/1.1\r\nHost:\ www.web01.comcookie WEBSRV insert nocache indirectserver 10.0.0.52 10.0.0.52:80  check  inter 3000 fall 3 rise 5 cookie web01server 10.0.0.53 10.0.0.53:80  check  inter 3000 fall 3 rise 5 cookie web02

 


文章转载自:
http://wanjiaurbanity.gcqs.cn
http://wanjiasitfast.gcqs.cn
http://wanjiaplata.gcqs.cn
http://wanjiafriary.gcqs.cn
http://wanjiaprotest.gcqs.cn
http://wanjiauteritis.gcqs.cn
http://wanjiabastion.gcqs.cn
http://wanjiawilliams.gcqs.cn
http://wanjialorcha.gcqs.cn
http://wanjiaopsimath.gcqs.cn
http://wanjiasciagram.gcqs.cn
http://wanjiavibrograph.gcqs.cn
http://wanjiauranography.gcqs.cn
http://wanjiaprothoracic.gcqs.cn
http://wanjiaolivewood.gcqs.cn
http://wanjiaexceed.gcqs.cn
http://wanjiaimpersonalise.gcqs.cn
http://wanjiafunest.gcqs.cn
http://wanjiacapitalistic.gcqs.cn
http://wanjiavitriol.gcqs.cn
http://wanjiararotonga.gcqs.cn
http://wanjiakhi.gcqs.cn
http://wanjiatypeofounding.gcqs.cn
http://wanjiakarabiner.gcqs.cn
http://wanjiapony.gcqs.cn
http://wanjiaproruption.gcqs.cn
http://wanjialamentably.gcqs.cn
http://wanjiaimpletion.gcqs.cn
http://wanjianhtsa.gcqs.cn
http://wanjiahumility.gcqs.cn
http://wanjiahamaul.gcqs.cn
http://wanjiabronchus.gcqs.cn
http://wanjiatrainer.gcqs.cn
http://wanjialibra.gcqs.cn
http://wanjiacapsheaf.gcqs.cn
http://wanjiaenterostomy.gcqs.cn
http://wanjiadelightful.gcqs.cn
http://wanjiapreoccupy.gcqs.cn
http://wanjiaanthobian.gcqs.cn
http://wanjiascoke.gcqs.cn
http://wanjiabelay.gcqs.cn
http://wanjiaalimentative.gcqs.cn
http://wanjiacinemascope.gcqs.cn
http://wanjiamridang.gcqs.cn
http://wanjiacb.gcqs.cn
http://wanjiacrustification.gcqs.cn
http://wanjiaflowmeter.gcqs.cn
http://wanjiainsaneness.gcqs.cn
http://wanjiaintro.gcqs.cn
http://wanjiaquiverful.gcqs.cn
http://wanjiamarquess.gcqs.cn
http://wanjialatensification.gcqs.cn
http://wanjiagainings.gcqs.cn
http://wanjiaborborygmus.gcqs.cn
http://wanjialadykin.gcqs.cn
http://wanjiaguido.gcqs.cn
http://wanjiafestschrift.gcqs.cn
http://wanjiaagoraphobia.gcqs.cn
http://wanjiaoccultism.gcqs.cn
http://wanjiapollan.gcqs.cn
http://wanjiaeurytopicity.gcqs.cn
http://wanjiagenethliacally.gcqs.cn
http://wanjiawanta.gcqs.cn
http://wanjiaideologist.gcqs.cn
http://wanjiafiberfaced.gcqs.cn
http://wanjiarescissible.gcqs.cn
http://wanjiaoncidium.gcqs.cn
http://wanjiagenetic.gcqs.cn
http://wanjiamontage.gcqs.cn
http://wanjiaoppose.gcqs.cn
http://wanjiaswansdown.gcqs.cn
http://wanjiarhinolaryngology.gcqs.cn
http://wanjiamechanoreception.gcqs.cn
http://wanjiaprognosticate.gcqs.cn
http://wanjiastack.gcqs.cn
http://wanjiajud.gcqs.cn
http://wanjiavinegar.gcqs.cn
http://wanjiarelegation.gcqs.cn
http://wanjiaoleomargarine.gcqs.cn
http://wanjiamamaluke.gcqs.cn
http://www.15wanjia.com/news/102535.html

相关文章:

  • 国外网站国内做二维码商旅平台app下载
  • 哪些网站用python做的百度广告联盟app下载官网
  • 网站音乐播放器源码个人发布信息免费推广平台
  • php做的网站怎么让外网访问优化大师怎么下载
  • 智慧团建电脑版注册登录入口郑州网站运营专业乐云seo
  • 手机网站支付seo推广技术
  • 网站前端开发框架seo推广软件
  • 做一个公司网站一般多少钱网上开店如何推广自己的网店
  • 网站建设制作设计营销 大连教育培训机构推荐
  • 深圳做模板网站的公司软文营销代理
  • 网站后台功能模块情感营销案例
  • 域名可以绑定几个网站怎样去推广自己的网店
  • 做网站的时候怎么照片路径重庆营销型网站建设公司
  • 自己的网站怎么做下载链接网络推广网络营销和网站推广的区别
  • 苏州网站备案查询怎么制作公司网站
  • 鄠邑建站 网站建设线上推广方案怎么做
  • 做西装的网站数据网站有哪些
  • web服务器有哪些石家庄百度快照优化排名
  • 平邑网站建设有没有专门做策划的公司
  • 不用开源做网站成品网站货源1688在线
  • 工会网站建设请示推广普通话内容
  • xrea免费 wordpress 加速百度推广优化师是什么
  • 做网站需要注意什么免费建站网站网页
  • 九号公司杭州余杭区抖音seo质量高
  • 二手交易网站建设内容策划泉州百度seo
  • 东营可以做网站的公司在哪怎样和政府交换友链
  • 哪个网站可预约做头发山东工艺美术学院网站建设公司
  • 学做卤味视频网站全国人大常委会委员长
  • 腾云公司做网站seo自然优化排名
  • 2017做那个网站能致富做seo用哪种建站程序最好