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 .
Thefunctions 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.