You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
* Update config-redis.md
add quick explanation how to setup Redis
* Update config-redis.md
Fix line length
* Update config-redis.md
fix markdown
Add more explanation about AOF and RDB
* Update src/guides/v2.3/config-guide/redis/config-redis.md
* RDB written out correctly
* Reformulated size explanation in config-redis.md to be more clear
Co-authored-by: Barny Shergold <[email protected]>
Co-authored-by: Margaret Eker <[email protected]>
Copy file name to clipboardExpand all lines: src/guides/v2.3/config-guide/redis/config-redis.md
+32-1Lines changed: 32 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Redis features include:
16
16
* Redis supports on-disk save and master/slave replication.
17
17
18
18
{:.bs-callout-info}
19
-
Starting in Magento 2.0.6, you can use either Redis or [memcached]({{ page.baseurl }}/config-guide/memcache/memcache.html) for session storage. Earlier issues with the Redis session handler and session locking have been resolved.
19
+
Starting from Magento 2.0.6, you can use either Redis or [memcached]({{ page.baseurl }}/config-guide/memcache/memcache.html) for session storage. Earlier issues with the Redis session handler and session locking have been resolved.
20
20
21
21
## Install Redis {#config-redis-install}
22
22
@@ -27,6 +27,37 @@ Installing and configuring the Redis software is beyond the scope of this guide.
## Set up redis configuration {#config-redis-setup}
31
+
32
+
Depending on your installation, you can usually find your Redis configuration in one of the following files: `/etc/redis/redis.conf` or `/etc/redis/<port>.conf`
33
+
34
+
To optimize the Redis instance for your requirements, you get best results by using a dedicated instance for each session, Magento cache and FPC.
35
+
36
+
For sessions, we recommend that you enable persistence to copy Redis data to disk using either of the following persistence options: regular Redis Database Backup (RDB) snapshots, or Append Only File (AOF) persistence logs.
37
+
38
+
* RDB (Redis Database Backup) snapshots store the complete database in a dump file after a given time, when a minimum number of keys have changed since the last save. Use the `save` setting inside the `redis.conf` file to configure this setting.
39
+
40
+
* AOF (Append Only File) stores each write operation sent to Redis in a journal file. Redis reads this file on restart only and uses it to restore the original dataset.
41
+
42
+
You can also enable both the RDB and AOF options at the same time. For additional details including the advantages and disadvantages of the persistence options, see the [Redis Persistence documentation](https://redis.io/topics/persistence).
43
+
44
+
For the cache instance, set up the instance so that it is large enough to store your entire Magento cache.
45
+
Size requirements depend on different factors like the number of products and store views. As a starting point, you can use the size of the cache folder on your file system. For example, if the `var/cache` folder on your file system is 5 GB, set up your Redis instance with at least 5 GB to start. Persistence is not required for the cache instance because the Magento cache can be restored. See also [Redis cache guide](https://redis.io/topics/lru-cache).
46
+
47
+
For performance tuning, you can also enable the following settings for asynchronous deletion. These settings do not change the behavior of Redis. See also [redis news](http://antirez.com/news/93) for details about asynchronous deletion.
48
+
49
+
```ini
50
+
lazyfree-lazy-eviction yes
51
+
lazyfree-lazy-expire yes
52
+
lazyfree-lazy-server-del yes
53
+
replica-lazy-flush yes
54
+
```
55
+
On Redis 6.x and later, you can also add the following value:
56
+
57
+
```ini
58
+
lazyfree-lazy-user-del yes
59
+
```
60
+
30
61
## For more information
31
62
32
63
You can find more information about configuring Redis from the following:
0 commit comments