Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 89f2908

Browse files
jonashremBarny Shergoldmeker12
authored
add small block about redis configuration (#8073)
* 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]>
1 parent 98db87f commit 89f2908

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/guides/v2.3/config-guide/redis/config-redis.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Redis features include:
1616
* Redis supports on-disk save and master/slave replication.
1717

1818
{:.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.
2020

2121
## Install Redis {#config-redis-install}
2222

@@ -27,6 +27,37 @@ Installing and configuring the Redis software is beyond the scope of this guide.
2727
* [digitalocean](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis)
2828
* [Redis documentation page](http://redis.io/documentation)
2929

30+
## 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+
3061
## For more information
3162

3263
You can find more information about configuring Redis from the following:

0 commit comments

Comments
 (0)