Ops Log: DedeCMS and Anquanbao CDN Issue
Original Chinese title: dedecms和安全宝运维的记录
The Problem
- On a DedeCMS system, everything worked fine without Anquanbao CDN, but once I put both
@andwwwbehind Anquanbao for acceleration, the site stopped loading. Without a CDN, however, our bandwidth couldn’t keep up with demand. Meanwhile, several Discuz! sites running alongside it had no issues with the CDN at all.
Troubleshooting Without Clear Visibility
-
First, I ruled out an iptables issue.
centos 6.5 》/etc/init.d/iptables status 打印 防火墙,全空配置。 -
After turning off Anquanbao, aside from maxing out bandwidth, site access and online user sessions were completely normal.
-
Another Discuz! site also used Anquanbao with basically the same node allocation and ran fine.
-
Switching to another CDN, Baidu Cloud Acceleration (Yunjiasu), worked without any problems. Gotta give credit to Baidu Cloud here—currently in public beta with no restrictions, rock-solid speed, and a free CC firewall that blocks massive traffic spikes from eating up bandwidth.
A Breakthrough
- I noticed that after enabling the service, the online user count slowly dropped, and traffic on other sites assigned to the same nodes also started dropping. Support reported that for the first ten minutes after connecting Anquanbao, nodes could reach the origin IP, and then it gradually stopped working.
- Connecting that with the CC attacks detected by Baidu Cloud Acceleration, the high request volume must have triggered the server’s hardware firewall, causing it to block the CDN nodes. Notifying the data center to whitelist the IPs solved the problem.
- Hats off to Baidu once again—their technology has really advanced by leaps and bounds over the past few years.
Tools Used
- Used 360’s speed testing tool for site checks: Qiyunce
- Baidu Cloud Acceleration
- The Pro tier of Anquanbao actually performed quite impressively overall—probably has some built-in protections Anquanbao
问题
- dedecms的系统,不用安全宝cdn什么问题都没,把@和www的域名使用安全包加速之后就出现打不开的情况。由于不使用cdn的话,带宽是满足不了需求的。同期还有几个discuz的站也在运行,用的cdn没有任何问题。
完全无法可见的解决
-
首先排除是iptables的问题。
centos 6.5 》/etc/init.d/iptables status 打印 防火墙,全空配置。 -
关闭安全宝之后除了带宽被占满,访问和在线都很正常。
-
另一个discuz站也是用了安全宝,基本一致的节点分配。运行情况良好。
-
使用另外一家cdn 百度云加速没有任何问题,这里不得不赞美下百度云,目前公测阶段,没有任何限制。速度稳定杠杠带,还有免费的cc防火墙使用,能阻挡大量站带宽的情况。
一些转机
- 注意开启服务之后在线人数是慢慢下降,同时分配了相同站点的站量也开始下降。客服反馈在接入安全宝的前十分钟是可以通过节点访问到原始ip,然后慢慢不行。
- 联想到百度云加速检查出来的cc攻击,应该是量太大的访问触发了服务器的硬件防火墙,做了阻拦。然后把节点给阻拦了。通知机房加IP解决问题。
- 再次膜拜下百度,这几年的技术完全是突发猛进。