-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add service scaleout with Redis Backplane (#9)
* Add service scaleout with Redis Backplane * Add small docs about scale with Redis
- Loading branch information
Showing
7 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/PeerMeeting.Host/Configuration/ConfigurationExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace PeerMeeting.Host.Configuration | ||
{ | ||
public static class ConfigurationExtensions | ||
{ | ||
public static RedisConfiguration GetRedisConfiguration(this IConfiguration configuration) | ||
{ | ||
var redisConfiguration = new RedisConfiguration(); | ||
configuration.GetSection("Redis").Bind(redisConfiguration); | ||
return redisConfiguration; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace PeerMeeting.Host.Configuration | ||
{ | ||
/// <summary> | ||
/// Redis backplane and distributed cache configuration | ||
/// </summary> | ||
public class RedisConfiguration | ||
{ | ||
/// <summary> | ||
/// Is Redis backplane and distributed cache enabled | ||
/// </summary> | ||
public bool Enabled { get; set; } = false; | ||
|
||
/// <summary> | ||
/// Redis connection string | ||
/// </summary> | ||
public string ConnectionString { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,9 @@ | |
} | ||
] | ||
}, | ||
"AllowedHosts": "*" | ||
"AllowedHosts": "*", | ||
"Redis": { | ||
"Enabled": false, | ||
"ConnectionString": "" | ||
} | ||
} |