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

add small block about redis configuration #8073

Merged
merged 22 commits into from
Oct 20, 2020
Merged
Changes from 8 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
52529c3
Update config-redis.md
jonashrem Oct 16, 2020
fd42dba
Update config-redis.md
jonashrem Oct 16, 2020
d4a4ec0
Update config-redis.md
jonashrem Oct 16, 2020
766ee99
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 19, 2020
fcd1378
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 19, 2020
e99dafa
Update config-redis.md
jonashrem Oct 19, 2020
1867be1
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 19, 2020
791b0ba
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 19, 2020
3cf0e3b
Update config-redis.md
jonashrem Oct 19, 2020
8b4ff9c
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 20, 2020
5a280ed
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 20, 2020
50d9c19
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 20, 2020
36f53ec
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 20, 2020
cd1f4b8
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 20, 2020
46a4cd4
Update config-redis.md
jonashrem Oct 20, 2020
fd21464
Update config-redis.md
jonashrem Oct 20, 2020
96d09a6
Update config-redis.md
jonashrem Oct 20, 2020
c79a29a
Update config-redis.md
jonashrem Oct 20, 2020
82922ea
Update config-redis.md
jonashrem Oct 20, 2020
153c194
Update config-redis.md
jonashrem Oct 20, 2020
324d97b
Update src/guides/v2.3/config-guide/redis/config-redis.md
jonashrem Oct 20, 2020
60cbcd6
Merge branch 'master' into patch-16
meker12 Oct 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion src/guides/v2.3/config-guide/redis/config-redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Redis features include:
* Redis supports on-disk save and master/slave replication.

{:.bs-callout-info}
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.
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.

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

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

## Set up redis configuration {#config-redis-setup}

Depending on your installation, you can usually find your Redis configuration at /etc/redis/redis.conf or /etc/redis/`port`.conf

To optimize your Redis instance to your needs, you get best results when using a dedicated instance for each sessions, Magento cache and FPC.

For sessions, it's recommended to enable persistence. This can either be done by regular RDB snapshots or by using the AOF persistence logs.
You can get details of the advantages and disadvantages of RDB and AOF on the [Redis Persistence documentation](https://redis.io/topics/persistence).

RDB (Redis Database File) 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.
This can be configured with the `save` setting inside `redis.conf`.

AOF (Append Only File) stores each write operation sent to Redis in a journal file. This file ẃill be read by Redis on restart to restore the original dataset.

It's possible to enable both RDB and AOF at the same time.

For the cache instance, you should make sure the instance is set up to be large enough to store your whole Magento cache.
The required size depends on different factors (like number of products and store views) but the required size of the file system cache gives you the order of
magnitude. Persistence is not required here as the Magento cache can be restored. See also [Redis cache guide](https://redis.io/topics/lru-cache).

For performance tuning you can also enable these settings for asynchronous deletion. This will not change the behavior of Redis (see also
[redis news](http://antirez.com/news/93).

```ini
lazyfree-lazy-eviction yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
replica-lazy-flush yes
```
From redis 6.x onwards, you can also set

```ini
lazyfree-lazy-user-del yes
```

## For more information

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