-------------------------------------------------------------------------------------------------------
Concept =
static URLs (static pages): 1. SEO 2. Access Speed block 3. Preventing SQL injection
Dynamic URL (Php page, can be passed parameters): 1. Unfavorable SEO 2. Slow access 3. There is an injected SQL may
Pseudo-static (rewrite of dynamic URLs): 1. SEO 2. Prevent injection 3. Access to the database remains unchanged
[email protected] Black eyed poet <www.chenwei.ws>----------------------------
Page static category =
On the way: 1. True static 2. Pseudo-Static
Range: 1. Global static 2. Local static (Ajax+jquery)
------------------------------------------------------------------------------------------------------
The necessity of the static page =
Apache/bin/ab.exe is an Apache self-test program that can be used to perform efficiency tests, test site concurrency, and access time for a page.
Basic use: AB [options][http[s]://]hostname[:p Ort]/path
Options option:-N Perform access times
-c Number of concurrent users
Ab.exe-n 10000-c http://localhost/test.php/* Accessed 10,000 times by 100 people, Apache will be paralyzed when changed to 1000 people
------------------------------------------------------------------------------------------------------
Adjust the maximum concurrency of Apache =
MPM (Multi-processing module, the way Apache handles concurrency), has three main ways:
1.prefork preprocessing process mode
2.worker working mode
3.winnt is typically used by Windows
Schematic diagram:
To set the Apache concurrency number steps:
1) changes in httpd.conf file
2) determine what the current Apache is in MPM mode
Enter Apache/bin
command, Httpd.exe-l.
Description, mpm_xxx c, if XXX is Winnt, description is Winnt, also may be prefork or worker
3) Modify the httpd-mpm.conf file (tune to 1000)
4) Restart Apache, test
Ab.exe-n 10000-c http://localhost/test.php
Under Linux, the generally used MPM is the prefork mode, how to configure the =
Recommended configuration (for most midsize sites):
Pre-Boot 5
Minimum idle Process 5
Maximum Idle Process 10
Serverlimit 1500/* New Plus, for modifying Apache programming parameters */
Maximum Concurrency 1000
Keep the process alive 0
If the site has PV values on millions, modify:
Serverlimit 2500
Maximum Concurrency 2000
More PV, an Apache can not meet the demand, using load balancer or Nginx reverse proxy.
----------------------------------------------------------------------------------------------------