Answer the question
In order to leave comments, you need to log in
Does it make sense to use php-redis instead of yii\redis\connection?
The load on the project increased, I started profiling and noticed that almost half of the time is spent on fwrite and fgets, which are called by yii\redis\connection. This component does not use the redis php extension at all and connects directly to the server. The yii\redis\connection and \Redis interfaces do not match, so I think it's worth writing an adapter? Something tells me (waits during fgets and fwrite - as I understand it, waiting for a response from Redis and delays are not related to the implementation of the connection) that the game is not worth the candle and we need to scale.
Answer the question
In order to leave comments, you need to log in
Not enough information.
Does all data stored in Redis fit in RAM?
Is Redis configured to take regular snapshots to disk?
The answers "no", "yes" mean that you have a significant performance drop. In the first option, it is very strong almost all the time, in the second option, at the time of creating snapshots
Try sharding a radish.
redis.io/topics/partitioning
// UPD
Perhaps the problem is in fwrite/fgets doing unnecessary io operations.
Measure benchmarks with native radish.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question