Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于预发环境redis需不需要隔离的问题 #1450

Closed
wangqingchengsg opened this issue Apr 30, 2024 · 1 comment
Closed

关于预发环境redis需不需要隔离的问题 #1450

wangqingchengsg opened this issue Apr 30, 2024 · 1 comment
Labels
question Further information is requested

Comments

@wangqingchengsg
Copy link

生产环境和预发环境使用同一个mongodb,注册中心使用不同的注册中心,那么redis使用同一个,database也使用同一个是否会有问题?还是redis必须隔离?

@JamesChenX
Copy link
Member

生产环境和预发环境使用同一个mongodb,注册中心使用不同的注册中心

It's practical but not recommended. From the perspective of data security, you should use different MongoDB clusters for different environments.

If you still want to use the same MongoDB cluster for different environments, remember to configure different databases for different environments. e.g.:

  1. mongodb://localhost:27017/my-app-qa
  2. mongodb://localhost:27017/my-app-uat
  3. mongodb://localhost:27017/my-app-prod

那么redis使用同一个,database也使用同一个是否会有问题?还是redis必须隔离?

It's not practical to use the same Redis instance for different environments because some keys will conflict.
Though Redis supports switching to different databases (0~15), we don't plan to support it because it is an error-prone practice for engineers, and it's insecure too, while deploying another Redis instance/cluster should be quite easy.

So it's recommended to deploy another Redis instance/cluster.

@JamesChenX JamesChenX added the question Further information is requested label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants