如何在一个环境标下面维护两套隔离的读写服务集群

Open
#5,698 6 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java, spring-boot

Research direction

The issue describes Eureka registration using Eureka.service.url, cluster, idc, and apollo.service.registry.cluster, but names no source files or tests. Start by reading the documentation for Eureka service registration and tracing how application-github.properties and server.properties supply registry settings. Done means identifying a supported way to register the new service cluster at a separate Eureka address, or documenting the configuration gap.

Written by the indexing model from the issue text.

Description

area/configservice kind/question stale

背景:我们这边已经存在一套PRO对应的读写服务节点,目前计划新增一套读写服务集群,这套读写服务仍然隶属于PRO环境标,所有读写服务连接的数据库是一个。但是需要新旧两套读写服务注册在不同的Eureka地址。由此实现客户端访问的时候,如果他连接旧的meta地址,就只能拿到旧的读服务实例,配置新的meta地址,只能访问新的读服务实例。

当前执行情况:按照文档说明,我在数据库中新加了一条Eureka.sercice.url数据,cluster写的是xc,已有旧的数据的cluster是default。读写服务所在机器上面没有
/opt/settings/server.properties这个配置,所以拿不到文档中的idc信息。

问题:如果只修改application-github.properties配置文件中的内容,是否有其他配置可以实现隔离?
目前使用apollo.service.registry.cluster=xc,这个是无法实现的,新的服务仍然会注册到default对应的Eureka地址上。直接在这个配置文件中添加idc也无法成功。

请教各位大佬,是否有比较好的解决办法呢?

Dominant language
Java
Stars
29.8k
Forks
10.1k
Avg merge
4d 2h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apolloconfig/apollo

All issues in apolloconfig/apollo

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.