Apache Belt has an ab stress test;
A concrete conceptual thing; a self-interested search;
Here is only a brief introduction to the use method;
Windows Sample: E:\WAMP64\BIN\APACHE\APACHE2.4.17\BIN\AB.EXE-N1000-C100HTTP://BAIJUNYAO.COM/ARTICLE/8
Mac, linux example:/usr/bin/ab-n1000-c100 HTTP://BAIJUNYAO.COM/ARTICLE/8
E:\wamp64\bin\apache\apache2.4.17\bin\ab.exe:windows the AB position under the example environment;
/usr/bin/ab:linux the position of AB in the sample environment;
-n1000: number of requests;
-C100: concurrency number;
HTTP://BAIJUNYAO.COM/ARTICLE/8: Testing the page
After the successful run, if your server does not have the appropriate precautions;
That will basically be reported:sqlstate[hy000] [2002] can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (111) this kind of error;
If it happens that your site often reports such errors, if there is no DDoS attack, there are some boring people taking your website to do the test;
DDoS attacks are difficult to defend against;
So, if it is a personal website, or a small business station, that basically can give up resistance;
But it is impossible to let it go directly;
This article introduces a simple and quick and effective preventive measures, with the help of third-party services;
1: Baidu Cloud Acceleration: http://su.baidu.com/
2:360 website Defender: http://wangzhan.360.cn/dns/
Here to Baidu cloud acceleration for example introduction;
1: First Register login http://su.baidu.com/
2: Add the website, enter the domain name, the recommended CNAME access mode, 1 minutes to take effect, NS mode is generally 2 days;
650) this.width=650, "alt=" Bai Jun Remote Blog "src=" http://www.baijunyao.com/Upload/image/ueditor/20160416/1460737376143937. JPG "title=" Bai Jun Remote Blog "height=" 476 "width=" 718 "style=" border:0px;width:718px;height:476px; "/>
3: Click Next to get the record value
650) this.width=650, "alt=" Bai Jun Remote Blog "src=" http://www.baijunyao.com/Upload/image/ueditor/20160416/1460737476162671. JPG "title=" Bai Jun Haruka Blog "height=" 385 "border=" 0 "vspace=" 0 "width=" 718 "style=" border:0px;width:718px;height:385px; "/>
650) this.width=650, "alt=" Bai Jun Remote Blog "src=" http://www.baijunyao.com/Upload/image/ueditor/20160416/1460737511175908. JPG "title=" Bai Jun Haruka Blog "height=" 393 "border=" 0 "vspace=" 0 "width=" 718 "style=" border:0px;width:718px;height:393px; "/>
4: Copy record value, resolve domain name, take million net as an example;
Type: TXT (do not select CNAME according to the official website example; otherwise it has been a failure)
Host Record: *
Resolve Route: Default
Record value: The record value copied in step three
650) this.width=650, "alt=" Bai Jun Remote Blog "src=" http://www.baijunyao.com/Upload/image/ueditor/20160416/1460737568671559. JPG "title=" Bai Jun Haruka Blog "height=" 314 "border=" 0 "vspace=" 0 "width=" 718 "style=" border:0px;width:718px;height:314px; "/>
5: Refresh the page; see if it is successful; million nets in a minute basic can be;
650) this.width=650, "alt=" Bai Jun Remote Blog "src=" http://www.baijunyao.com/Upload/image/ueditor/20160416/1460737773267590. JPG "title=" Bai Jun Haruka Blog "height=" 336 "border=" 0 "vspace=" 0 "width=" 718 "style=" border:0px;width:718px;height:336px; "/>
After the success, then take the AB test, see if MySQL will still collapse, if not collapse, then congratulations; tutorial to this end;
As for the Baidu Cloud accelerated other features such as Web compression can also try;
This article for Bai Jun Remote original article, reprinted without contact with me, but please specify from Bai Jun remote blog http://www.baijunyao.com
Using the Baidu cloud accelerated anti-Apache AB test