Reputation: 193
Which one should I choose and why between predis and phpredis ?I am using NGINX and Codeigniter.Thanks in advance
Upvotes: 13
Views: 19014
Reputation: 3834
I'll consider that your concern is performance and you mean "Which is faster?".
The short answer is "PhpRedis".
PhpRedis is a PHP extension (written in C) and Predis is a PHP package (written in PHP).
Based on many benchmarks like the mentioned link below, PhpRedis is about 6 times faster than Predis. It's recommended to use PhpRedis if performance is a concern to your service.
Useful links:
PhpRedis vs Predis: Comparison on real production data
Upvotes: 26
Reputation: 6693
It is worth noting that aside from library performance considerations, PHPRedis is presently lagging behind Predis in adding Redis 7 feature support (which I was looking for), so timing of your project implementation can also be a factor.
Upvotes: 5