How to optimize PHP website when high concurrency

Source: Internet
Author: User
Tags php website nginx reverse proxy
This article is about the high concurrency of the PHP website how to optimize, has a certain reference value, now share to everyone, the need for friends can refer to the high concurrency solution case:

When the QPS reaches 2000,
Optimization scenario: Doing business separation, distributed storage

1. Flow optimization

Anti-theft chain processing (removal of malicious requests), current limit, speed limit, limiting concurrency


2. Front-End optimization
(1) Reduce HTTP requests [merge CSS,JS, etc.]
(2) Add an asynchronous request (do not show all the data to the user first, the user triggers an event before the data is requested asynchronously)
(3) Enable browser cache and file compression
(4) CDN Acceleration
(5) Create a standalone image server (reduce I/O)


3. Service-Side optimization

(1) static page
(2) Concurrent processing
(3) Queue processing

4. Database optimization
(1) Database Cache
(2) Sub-database sub-table, partition
(3) Read/write separation
(4) Load balancing

5.web Server Optimization
(1) Nginx reverse proxy for load balancing
(2) LVs for load Balancing
Related recommendations:

How to deal with large traffic and high concurrency problems in PHP Web site

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.