Establish migration strategy for Sessions workload
To support migration for Redis Sessions, we'll need to rollout 3 MRs below:
- Support rollback from the new CacheStoretoRedisStore. MR gitlab-org/gitlab!176876 (merged). In this MR, the oldRedisStoresupports reading anActiveSupport::Cache::Entryobject which is introduced in MR 2. In the scenario of rollback/revert of MR 2, new session data can still be read by the application.
- Support rollforward from the old RedisStoretoCacheStore. MR gitlab-org/gitlab!176108 (merged). This MR changes the session store implementation and support reading the old session data fromRedisStore.
- Add MultiStorewhich actually does the dual-writing. MR gitlab-org/gitlab!175735 (merged).
More context can be found at #35 (comment 2278902354).
Once we roll out MR 2, sessions data in the new CacheStore will be written in a new format. The MRs above are laid out in a way that we could revert the MR from 2 -> 1 or 3 -> 2.
Rollout of MR 2 requires updating environment variable USE_REDIS_CACHE_STORE_AS_SESSION_STORE. We couldn't use FF here because the session store is configured at initializer.
Rollout plan
We'll separate the CR for enabling the env var and the actual migration with MultiStore as below.
Pre: We've cancelled rolling out on pre because pre release only happens once a month.
- CR for enabling- USE_REDIS_CACHE_STORE_AS_SESSION_STOREgitlab-com/gl-infra/production#19149 (closed)
- CR for configuring application to use the Redis Cluster gitlab-com/gl-infra/production#19150 (closed)
Staging:
- 
CR for enabling USE_REDIS_CACHE_STORE_AS_SESSION_STOREgitlab-com/gl-infra/production#19142 (closed)
- 
CR for configuring application to use the Redis Cluster gitlab-com/gl-infra/production#19171 (closed) 
Prod:
- 
CR for enabling USE_REDIS_CACHE_STORE_AS_SESSION_STOREgitlab-com/gl-infra/production#19144 (closed)
- 
CR for configuring application to use the Redis Cluster gitlab-com/gl-infra/production#19252 (closed) 
Issue from previous migration: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/2858