1.基础工具与只是介绍node
(1)压测工具的安装 nginx
yum -y install httpd-tools 算法
ab -V安全
(2)压测工具的使用 网络
检测接口的最大qps 架构
ab -n100 -c10 http://xxxx并发
(3)nginx 限流配置工具
按链接数限速,并发数(ngx_http_limit_conn_module) 按请求速率限速,按ip限制单位时间内的请求数(ngx_http_limit_req_module)cdn
限流配置:接口
▲建立规则 limit_req_zone $binary_remote_addr zone=mylimit:10m rate=1r/s;
▲使用规则 limit_req zone=mylimit burst=1 nodelay;
(4)限流算法
▲令牌桶算法
▲漏桶算法
(5)CDN(内容分发网络 Content Delivery NetWork)
★缩短访问路径、减小源站压力、提升内容响应速度
★为源站提高安全保护
★cdn架构:
客户端--->北京CDN---------↓
源Server
客户端--->上海CDN---------↑
(6)