Questions about performance tuning

background: a set of app keys , fixed dividends and my assets . Each user can only create a maximum of 5 pairs of keys. Each user can participate in a fixed dividend (a current deposit similar to Yu"e Bao). My assets need to return the values of total amount, available amount, frozen amount, and total fixed investment .

The

functions are simple, but the technical director requires that the QPS of the interface must be above 6000 to pass. The current train of thought is:

create an app key and a fixed dividend. After data validity verification (user real name verification, user available amount, etc.), the database and Redis write data at the same time, and the list data is read from Redis.
my assets, because of the real-time nature of the data, read from the database ( uses the index ) without caching.

using JMeter to stress test 1000 concurrency, the result of QPS is only more than 3000, which is far from meeting the requirements.

I would like to ask you, is there any effective optimization scheme from the three aspects of code, Redis and MySQL?

the PS: language is PHP, and the framework is phalcon.

Apr.01,2021

you can interface data operations to read from redis, and Synchronize redis data to mysql through the daemon.


does the response time meet the requirements? There are two ways to improve throughput: one is to reduce the response time, and the other is to increase the number of concurrent processing

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea26c8-1bd3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea26c8-1bd3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?