Here's a cool article I found on Nextcloud performance improvements, and connecting Redis over Unix sockets gave me a more substantial performance improvement than migrating to Postgres. Very happy I fell down this rabbit hole today.
To note if you're following the tutorial in the link above, and for people using the nextcloud:stable container together with the recommended cron container:
the redis configuration (host, port, password, ...) need to be set in config/config.php, as well as config/redis.config.php
the cron container needs to receive the same /etc/localtime and /etc/timezone volumes the app container did, as well as the volumes_from: tmp