


What is the difference between WeChat development for 10 million fans and a few thousand fans?
(ps: I was tortured when I went to a big company for an interview. I went back and looked for information and found that there was very little in this area, and I was still confused.)
For example:
1. High concurrency and large traffic,
2. Disconnection and reconnection
3. The amount of data is too large and the request times out
4. Pushed text user synchronization and other issues.
I hope experienced experts can share with you how to develop in the case of large traffic. When developing with low user volume, you often don’t pay attention to the pits you dig and step on the thunder; and how to build large traffic samples for testing. , as well as learning directions and recommended books in this area.
(I am a back-end scumbag with 1 year of experience, thank you for your attention and answers) over!
Reply content:
(ps: I was tortured when I went to a big company for an interview. I went back and looked for information and found that there was very little in this area, and I was still confused.)
For example:
1. High concurrency and large traffic,
2. Disconnection and reconnection
3. The amount of data is too large and the request times out
4. Pushed text user synchronization and other issues.
I hope experienced experts can share with you how to develop in the case of large traffic. When developing with low user volume, you often don’t pay attention to the pits you dig and step on the thunder; and how to build large traffic samples for testing. , as well as learning directions and recommended books in this area.
(I am a back-end scumbag with 1 year of experience, thank you for your attention and answers) over!
Nowadays, interviewers like to ask these pretentious questions. Few of them know how to actually operate it. What they know is just theory. If you are not a technical director, you will not be given the opportunity to implement it. 10 interviewers asked this question 9 are show-offs.
Let me talk about what I have used
1 First of all, tens of millions of users depends on what kind of project you are. Ordinary projects do not have many 1,000,000-level users, because ordinary projects will not have user activity at all
2 Definition of high concurrency: same The number of IP requests per second. From my personal understanding, high concurrency refers to two aspects, one is your service, and the other is your program business logic.
Services: apache, nginx + fastcgi
Programming: I personally think this is the key point, because the bottleneck of web applications lies in the database. Your business logic will add, delete, check and modify the database. Therefore, when the current request volume reaches a certain base, it is likely to cause the memory occupied by the database to increase, and even cause your table to deadlock, or the database to crash.
To solve this problem: 1. First, you need to write a log at the entrance of your program to record the address and parameters of each request. 2 Analyze which requests have too high access frequency based on your logs (it is impossible for every request to access high frequency) 3 Find out the addresses with too high access requests, analyze the corresponding business logic, optimize the code and SQL statements, and do it according to functional requirements Proper caching
Database aspects: 1. Based on the above analysis results, tables that require frequent operations are obtained. Most of them are database query operations. (Generally, tables with frequent operations include: user information table. General tables with large amounts of data: financial record table, user log table.) Then divide the tables according to business logic. 1. Put the fields that are frequently queried in the user table into one table. 2. Put the user statistical information and unusual data into another table or tables. 3 For tables with large amounts of data, you can use time periods to divide tables, such as one financial record table and user log table for a month or a week. Another way is to divide tables according to business logic, such as one table for active user information and one table for inactive users. Another table is divided into tables according to user ID. For example, a table with the first digit of user ID being 1, a table with 2, and so on to create 10 tables.
Then use read-write separation to establish a master-slave library. There are many more things to say in a more detailed direction. But for general companies, there is really no need. If you have such a large number of users, it means that the company has money. If the company has money, many things can be improved through hardware, and it can hire full-time personnel at high prices. You are just interviewing PHP. I don’t have a log table and I haven’t done anything about the daily increase of 10 million.
3 Don’t be intimidated by this kind of people, just go to Baidu and memorize the answers, and memorize them for you next time you meet them.
Maybe their company is not hiring, but they just encountered such a problem and didn’t want to spend money, so they made it an interview question. . .

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

In PHP8, match expressions are a new control structure that returns different results based on the value of the expression. 1) It is similar to a switch statement, but returns a value instead of an execution statement block. 2) The match expression is strictly compared (===), which improves security. 3) It avoids possible break omissions in switch statements and enhances the simplicity and readability of the code.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.
