1、使用大内存服务器 2、 创建磁盘缓存时不要使用RAID,通过cache_dir配置使用时,每个独立磁盘只配置一个缓存 cache_dir ufs /mnt/sdb1 8096 32 32 cache_dir ufs /mnt/sdc1 8096 32 32 3、禁用atime更新 /dev/sdb1 /mnt/sdb1 ext3 noatime,nodiratime 0 0 4、squid对CPU的支持不好,对多CPU,配置多实例 visible_hostname unique_hostname http_port snmp_port access_log cache_log pid_filename cache_dir这几项要不一样 5、对squid做负载均衡时,要采用URL哈希方法 6、禁用缓存通信协议
image.png
7、架构二级缓存
image.png
8、配置静态文件请求后是否缓存文件的大小判断,range_offset_limit
image.png
9、使用squid manager获取运行状态
image.png
10、在squid增加图片、视频防盗链
redirect_program /usr/local/squid/etc/checkkey.pl
redirect_children 20
image.png
image.png
image.png
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有