上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 40 下一页
摘要: 1)配置被盗链的网站 [root@web02 /etc/nginx/conf.d]# vim beidaolian.conf server { listen 80; server_name linux.beidaolian.com; location / { root /code/beidaolia 阅读全文
posted @ 2020-09-11 15:46 六月OvO 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 1)静态资源压缩语法 #开启压缩 Syntax: gzip on | off; Default: gzip off; Context: http, server, location, if in location #指定压缩类型 Syntax: gzip_types mime-type ...; D 阅读全文
posted @ 2020-09-11 15:33 六月OvO 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #公司测试化境经常更新前端代码,需要关闭缓存 1.使用无痕模式 2.开启浏览器 Disable cache 3.配置nginx location ~* \.(jpg|png|gif)$ { root /code/cache; add_header Cache-Control no-cache; et 阅读全文
posted @ 2020-09-11 15:30 六月OvO 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #语法 Syntax: expires [modified] time; expires epoch | max | off; Default: expires off; Context: http, server, location, if in location #配置过期时间 [root@we 阅读全文
posted @ 2020-09-11 15:29 六月OvO 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1.浏览器会先去查看响应头部的cache-control(缓存控制)2.如果没有到达过期时间,会直接返回缓存中的内容,不需要重新读取服务器3.如果cache-control设置为 no-cache,浏览器会去读取expires(缓存过期时间)4.如果没有到达expires过期时间,会直接返回缓存中的 阅读全文
posted @ 2020-09-11 15:27 六月OvO 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 1.配置nginx代理开启长连接 [root@lb01 ~]# vim /etc/nginx/conf.d/proxy.conf upstream web { server 172.16.1.7:80; keepalive 16; #开启长连接 } server { listen 80; serve 阅读全文
posted @ 2020-09-11 15:25 六月OvO 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 1.查看文件句柄命令 #查看文件句柄数设置 [root@web01 ~]# ulimit -n 65535 #查看总共打开的文件句柄数 [root@web01 ~]# lsof | wc -l #查看进程打开的文件句柄数 [root@web01 ~]# lsof -p 71336 | wc -l 2 阅读全文
posted @ 2020-09-11 15:23 六月OvO 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.安装ab工具 #查看命令所在包 [root@web01 /server]# yum provides ab #安装ab [root@web01 /server]# yum install -y httpd-tools 2.工具使用 [root@web01 ~]# ab -n 200 -c 2 h 阅读全文
posted @ 2020-09-11 15:17 六月OvO 阅读(91) 评论(0) 推荐(0) 编辑
摘要: OSI七层模型:物理层,数据链路层,网络层,传输层,会话层,表示层,应用层 1.硬件:磁盘,内存,CPU2.网络:带宽,网速,丢包,延迟3.系统:文件描述符(文件句柄数)4.应用:服务与服务之间保持长连接5.服务:nginx、MySQL、php 影响性能的指标 1.网络 1)网络的流量 2)是否有丢 阅读全文
posted @ 2020-09-11 15:10 六月OvO 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1、首先需要了解我们当前系统的结构和瓶颈,了解当前使用的是什么,运行的是什么业务,都有哪些服务,了解每个服务最大能支撑多少并发。比如nginx作为静态资源服务并发是多少,最高瓶颈在哪里,能支持多少qps(每秒查询率)的访问请求,那我们怎么得出这组系统结构瓶颈呢,比如top查看系统的CPU负载、内存使 阅读全文
posted @ 2020-09-11 15:08 六月OvO 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 40 下一页