Starts in:
1 DAY
5 HRS
21 MIN
46 SEC
Starts in:
1 D
5 H
21 M
46 S
Open Closed

Redis cache between deployment stages #3234


User avatar
0
LW created
  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

How should the Redis cache be configured between different instances of the application? We have planned to use four deployment stages (UAT, QA, Canary Production and Production). Can we share the Redis cache server between some of the stages or will there be a problem of data mixing between the stages?

Actually, I have now tested this and at least the redirect URL configuration gets mixed up between the stages. Is there a way to define instance-specific key through configuration so the values won't mix up in the cache?


2 Answer(s)
  • User Avatar
    0
    LW created

    I found out that we have this kind of configuration var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("ABC"); dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "ABC-Protection-Keys");

    I can see two different options to discriminate the data between the deployment stages: either define the stage in application name or Redis key name ( ABC-Protection-Keys). The question is which should we use and should we set different application names for the identity server and the web application?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can only use different connection strings in different environments, otherwise there will be conflicts.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06