When to use Redis instead of MySQL for PHP applications?

前端 未结 6 696
-上瘾入骨i
-上瘾入骨i 2021-01-31 01:06

I\'ve been looking at Redis. It looks very interesting. But from a practical perspective, in what cases would it be better to use Redis over MySQL?

6条回答
  •  我在风中等你
    2021-01-31 02:01

    According to the official website, Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. Actually, Redis is an advanced key-value store. It is literally super fast with amazingly high throughput as it can perform approximately 110000 SETs per second, about 81000 GETs per second. It also supports a very rich set of data types to store. As a matter of fact, Redis keeps the data in-memory every time but also persistent on-disk database. So, it comes with a trade-off: Amazing speed with the size limit on datasets (as per memory). In this article, to have some benchmarks in comparison to MySQL, we would be using Redis as a caching engine only.

    Read Here: Redis vs MySQL Benchmarks

提交回复
热议问题