High-concurrency counting method based on MySQL counter and web server
Patent Information
- Authority / Receiving Office
- CN ยท China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NUBIA TECHNOLOGY CO LTD
- Publication Date
- 2018-03-30
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the field of web technologies, in particular to a high concurrency counting method based on a MySQL counter table and a web server. Background technique
[0002] MySQL counter tables are very common in web applications. For example, it is necessary to count the number of clicks by users on the website, the number of file downloads, and the number of new users on the website, etc., all of which need to use counters. Usually, web developers will create a separate table for count-related data, which can make the counter table small and fast, but in MySQL, there will be a row-level transaction for the row update operation of the counter of this record, that is, this Each record will have a global mutex. At the same time, only one process (or thread) can update the record. Therefore, in the case of high concurrency, the update operation of the counter will become very slow, causing the process (thread) to block and making the perfo...