質問

I'm managing a hosting server and one of my customers will launch a high traffic PHP website. It's a penny auction website and we expect between 25k and 30k visitors per day.

Can you tell me please what should I change in my server configuration (PHP and Apache) to avoid problems? I'm afraid that the server crash with a large number of visitors.

Thank you

役に立ちましたか?

解決

Using a lighter web server like nginx as a reverse proxy and a static content server should keep the Apache memory and CPU usage to a minimum which will be a problem on larger sites.

APC as an opcode cache will also be useful in a large site because compiling the PHP scripts to opcode is expensive.

Which Apache forking model are you using for the server? Event and Worker MPM's will probably work better for larger sites with higher concurrent connections.

How is PHP setup within Apache, i.e. FastCGI/CGI/DSO/SuPHP/FPM? SuPHP will be slowest while FastCGI, FPM and DSO will give you much better performance and allow you to use opcode caches.

If you don't need SSL support on the site a free service like https://www.cloudflare.com/ will also lessen the load on your servers.

他のヒント

You could put an opcode cache into use, eAccelerator is a good one for this purpose.

You may also want to consider creating Apache vHosts for static content like images/CSS/javascript to be served from. If these can be put into a CDN, then even better.

There are other tools available for benchmarking, including the Apache benchmarking tool "ab". You can use this to stress-test your site.

There are several areas in which tuning can take place, not just PHP.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top