Project

General

Profile

Actions

Feature #95172

closed

Support different connections for read and write access to redis

Added by Sebastian Michaelsen over 2 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2021-09-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

If you have multiple redis containers with replications you will want to read from one redis instance and write to the other.
At the moment, the TYPO3 redis caching backend doesn't support configuring separate connectivity configuration for read and write.

Suggestion:

The possibility to configure one connection should be kept as it is for simplicity and backwards compatibility. Additionally the keys read and write can override individual options of the default connection.

SYS:
  caching:
    cacheConfigurations:
      extbase:
        backend: '\TYPO3\CMS\Core\Cache\Backend\RedisBackend'
        options:
          defaultLifetime: 31536000
          hostname: '%env(REDIS_REPLICA)%'
          port: 6379
          database: 0
          write:
            hostname: '%env(REDIS_MASTER)%'
Actions #1

Updated by Sebastian Michaelsen over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Sebastian Michaelsen over 2 years ago

  • Category set to Caching
Actions #3

Updated by Sebastian Michaelsen over 2 years ago

  • Description updated (diff)
Actions #4

Updated by Sebastian Michaelsen over 2 years ago

  • Description updated (diff)
Actions #5

Updated by Benni Mack over 2 years ago

  • Status changed from New to Rejected

Hey Sebastian,

I do have a same issue with various other topics (read+write DB API). In my case, this is project-specific, so I used a different Backend (or in my case a RedisBackend). It should be fairly simple to do this via an extension / composer package for the ecosystem and implement this with just a custom class.

One other use case was to create my own RedisBackend: https://github.com/b13/graceful-cache

In general, the Redis (Sentinel) or DB (Galera) should manage read/write access. This is a nice feature, but really something for an extension and not for TYPO3 Core. Sorry.

Actions

Also available in: Atom PDF