A
A
Alzasr2015-05-19 08:36:00
Yii
Alzasr, 2015-05-19 08:36:00

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

2 answer(s)
F
Fortop, 2015-05-19
@Alzasr

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

M
Mikhail Osher, 2015-05-19
@miraage

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 question

Ask a Question

731 491 924 answers to any question