Redis Sentinel configuration

This commit is contained in:
David Bomba 2021-04-21 15:11:19 +10:00
parent bc5b654f28
commit 2fb342c5cb
6 changed files with 193 additions and 396 deletions

View File

@ -58,7 +58,6 @@
"league/omnipay": "^3.1", "league/omnipay": "^3.1",
"livewire/livewire": "^2.0", "livewire/livewire": "^2.0",
"maennchen/zipstream-php": "^1.2", "maennchen/zipstream-php": "^1.2",
"monospice/laravel-redis-sentinel-drivers": "^2.7",
"nwidart/laravel-modules": "^8.0", "nwidart/laravel-modules": "^8.0",
"omnipay/paypal": "^3.0", "omnipay/paypal": "^3.0",
"pragmarx/google2fa": "^8.0", "pragmarx/google2fa": "^8.0",

518
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -86,10 +86,6 @@ return [
'endpoint' => env('DYNAMODB_ENDPOINT'), 'endpoint' => env('DYNAMODB_ENDPOINT'),
], ],
'redis-sentinel' => [
'driver' => 'redis-sentinel',
'connection' => 'default',
],
], ],
/* /*
@ -105,4 +101,4 @@ return [
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
]; ];

View File

@ -154,14 +154,13 @@ return [
], ],
'sentinel-default' => array_merge( 'sentinel-default' => array_merge(
[ array_map(
"host" => "v5db1", function ($a, $b) {
"port" => "26379", return ["host" => $a,"port" => $b];
], },
[ explode(',', env('REDIS_HOST', 'localhost')),
"host" => "v5db2", explode(',', env('REDIS_PORT', 26379))
"port" => "26379", ),
],
['options' => [ ['options' => [
'replication' => 'sentinel', 'replication' => 'sentinel',
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'), 'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
@ -173,14 +172,13 @@ return [
), ),
'sentinel-cache' => array_merge( 'sentinel-cache' => array_merge(
[ array_map(
"host" => "v5db1", function ($a, $b) {
"port" => "26379", return ["host" => $a,"port" => $b];
], },
[ explode(',', env('REDIS_HOST', 'localhost')),
"host" => "v5db2", explode(',', env('REDIS_PORT', 26379))
"port" => "26379", ),
],
['options' => [ ['options' => [
'replication' => 'sentinel', 'replication' => 'sentinel',
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'), 'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
@ -193,27 +191,4 @@ return [
], ],
'redis-sentinel' => [
'default' => [
[
'host' => 'v5db1',
'port' => 26379,
],
[
'host' => 'v5db2',
'port' => 26379,
],
],
'options' => [
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
'parameters' => [
'password' => env('REDIS_PASSWORD', null),
'database' => 0,
],
],
],
]; ];

View File

@ -67,13 +67,6 @@ return [
'block_for' => null, 'block_for' => null,
], ],
'redis-sentinel' => [
'driver' => 'redis-sentinel',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 90, // Laravel >= 5.4.30
'expire' => 90, // Laravel < 5.4.30
],
], ],
/* /*
@ -93,4 +86,4 @@ return [
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],
]; ];

View File

@ -72,7 +72,7 @@ return [
| |
*/ */
'connection' => env('SESSION_CONNECTION', 'default'), 'connection' => env('SESSION_CONNECTION', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------