PHPackages                             b13/distributed-locks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. b13/distributed-locks

ActiveTypo3-cms-extension[Caching](/categories/caching)

b13/distributed-locks
=====================

Redis-based Locking - Adds a Redis Locking Strategy for TYPO3 frontend page generation, useful on distributed systems with NFS.

3.0.0(3w ago)13276.3k↓45.6%10[7 issues](https://github.com/b13/distributed-locks/issues)[1 PRs](https://github.com/b13/distributed-locks/pulls)GPL-2.0-or-laterPHPPHP ^8.0

Since Jun 25Pushed 3w ago2 watchersCompare

[ Source](https://github.com/b13/distributed-locks)[ Packagist](https://packagist.org/packages/b13/distributed-locks)[ RSS](/packages/b13-distributed-locks/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (8)Used By (0)

Distributed Redis Locker for TYPO3 Locking Mechanism
====================================================

[](#distributed-redis-locker-for-typo3-locking-mechanism)

TYPO3 has three built-in Locking Strategies, that are chosen at runtime which fits best for the current system setup.

- SemaphoreLockStrategy
- SimpleLockStrategy
- FileLockStrategy

However, when dealing with a multi-tier system and a shared file system with multiple frontend nodes with a NFS filesystem, it is especially helpful to use a better suitable format. Redis is our weapon of choice for handling multi-node scenarios, and works just fine with TYPO3 and Caching.

This extension provides a Redis Locking mechanism to store the locks in a (shared) Redis database.

Requirements
------------

[](#requirements)

This extension is available for TYPO3 v8+ LTS, and requires the PHP package `php-redis` as well as a Redis server.

Installation
------------

[](#installation)

Install this extension via composer `composer require b13/distributed-locks` or extensions.typo3.org / Extension Manager, and activate it in the Extension Manager.

Now add the following lines to your LocalConfiguration / AdditionalConfiguration to activate Redis Locking.

```
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locking']['redis'] = [
    'hostname' => '127.0.0.1',
    'database' => 12
];

```

Other options:

```
'ttl' (numeric, default is 30sec)
'port' (numeric, default is 6379)
'password' (contains the password, necessary for secure authentication if required by redis)
'username' (contains an username, if required by redis)
'priority' (numeric, default is 95) - Set priority for this locking strategy. See LockingApi documentation.

```

Disabling it in certain contextes
---------------------------------

[](#disabling-it-in-certain-contextes)

If you have different `TYPO3_CONTEXT` or environments and you want to switch off the complete redis strategy (i.e. in your staging machine), you can set this in your LocalConfiguration / AdditionalConfiguration:

```
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locking']['redis']['disabled'] = true;

```

Future Development
------------------

[](#future-development)

Should be switched to `symfony/lock` to allow distributed redis services and other lockers.

Credits &amp; Background
------------------------

[](#credits--background)

Inspiration was taken from the now unmaintained extension "redis\_lock\_strategy" which we used several times, however with some drawbacks:

- No stable version for TYPO3 v9 in composer mode
- No maintainer available for releases anymore
- Destroying an object did not remove locks, ending in certain dead lock scenarios in broken scripts

Thanks to Alexander Miehe for the initial extension and the conceptual work.

Sharing our expertise
---------------------

[](#sharing-our-expertise)

[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~423 days

Recently: every ~495 days

Total

7

Last Release

24d ago

Major Versions

v1.4.0 → v2.0.02024-06-20

v2.0.0 → 3.0.02026-06-09

PHP version history (3 changes)v1.0.0PHP ^7.0

v1.3.0PHP ^7.0 | ^8.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/165630?v=4)[Benni Mack](/maintainers/bmack)[@bmack](https://github.com/bmack)

![](https://avatars.githubusercontent.com/u/2851821?v=4)[b13 GmbH](/maintainers/b13)[@b13](https://github.com/b13)

---

Top Contributors

[![bmack](https://avatars.githubusercontent.com/u/165630?v=4)](https://github.com/bmack "bmack (8 commits)")[![davidsteeb](https://avatars.githubusercontent.com/u/3862523?v=4)](https://github.com/davidsteeb "davidsteeb (4 commits)")[![achimfritz](https://avatars.githubusercontent.com/u/2152991?v=4)](https://github.com/achimfritz "achimfritz (3 commits)")[![sgrossberndt](https://avatars.githubusercontent.com/u/3786510?v=4)](https://github.com/sgrossberndt "sgrossberndt (2 commits)")[![sypets](https://avatars.githubusercontent.com/u/13206455?v=4)](https://github.com/sypets "sypets (2 commits)")[![stucki](https://avatars.githubusercontent.com/u/320916?v=4)](https://github.com/stucki "stucki (1 commits)")[![un3us](https://avatars.githubusercontent.com/u/23715474?v=4)](https://github.com/un3us "un3us (1 commits)")[![ArbitraryCritter](https://avatars.githubusercontent.com/u/17120528?v=4)](https://github.com/ArbitraryCritter "ArbitraryCritter (1 commits)")[![b13-michaelsemle](https://avatars.githubusercontent.com/u/23473071?v=4)](https://github.com/b13-michaelsemle "b13-michaelsemle (1 commits)")[![baschny](https://avatars.githubusercontent.com/u/337581?v=4)](https://github.com/baschny "baschny (1 commits)")[![calien666](https://avatars.githubusercontent.com/u/11405116?v=4)](https://github.com/calien666 "calien666 (1 commits)")

---

Tags

redislockingTYPO3 CMSnfs

### Embed Badge

![Health badge](/badges/b13-distributed-locks/health.svg)

```
[![Health](https://phpackages.com/badges/b13-distributed-locks/health.svg)](https://phpackages.com/packages/b13-distributed-locks)
```

###  Alternatives

[lochmueller/staticfilecache

Transparent static file cache solution using mod\_rewrite and mod\_expires. Increase performance for static pages by a factor of 230!!

1271.4M4](/packages/lochmueller-staticfilecache)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[derhansen/sf_event_mgt

Event management and registration - Configurable event management and registration extension based on ExtBase and Fluid

66338.4k10](/packages/derhansen-sf-event-mgt)[eliashaeussler/typo3-warming

Warming - Warms up Frontend caches based on an XML sitemap. Cache warmup can be triggered via TYPO3 backend or using a console command. Supports multiple languages and custom crawler implementations.

22260.2k](/packages/eliashaeussler-typo3-warming)[brotkrueml/schema

Embedding schema.org vocabulary - API and view helpers for schema.org markup

34653.7k16](/packages/brotkrueml-schema)[web-vision/wv_deepltranslate

DeepL Translate (CORE) - This extension provides option to translate content element, and TCA record texts to DeepL supported languages.

33304.3k](/packages/web-vision-wv-deepltranslate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
