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

Support DNS SRV Records within Ringpop #4614

Merged
merged 6 commits into from
Nov 10, 2021

Conversation

lindleywhite
Copy link
Contributor

This PR adds the ability to configure an additional DNS method to reference DNS SRV records. This allows the initial service discovery of services to lookup hosts based on SRV records instead of having fixed ports within the host configuration.

Cadence is required to have fixed ports when configuring it mainly because it is expected to be hosted on primary VMs. However, when you deploy Cadence to a containerized environment you may not be able to fix ports to hosts and would rather have dynamic discoverability.

The tests are supplied with the code. The code just extends what is already there.

The worst case would be that the net.DefaultResolver can not lookup SRV records and thus the server components erring out on startup.

Release notes
Cadence can now support DNS SRV records within the configuration.

Documentation Changes
This could be added as an option within the ringpop configuration. Please advise.

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2021

CLA assistant check
All committers have signed the CLA.

@emrahs
Copy link
Contributor

emrahs commented Nov 3, 2021

@mantas-sidlauskas

common/config/ringpop.go Outdated Show resolved Hide resolved
common/config/ringpop.go Show resolved Hide resolved
@longquanzheng longquanzheng enabled auto-merge (squash) November 10, 2021 17:20
@longquanzheng longquanzheng merged commit e15f181 into cadence-workflow:master Nov 10, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build f3484cc7-2d30-4150-9699-f5288b7521bf

  • 53 of 59 (89.83%) changed or added relevant lines in 1 file are covered.
  • 181 unchanged lines in 21 files lost coverage.
  • Overall coverage decreased (-0.08%) to 56.849%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/config/ringpop.go 53 59 89.83%
Files with Coverage Reduction New Missed Lines %
common/task/weightedRoundRobinTaskScheduler.go 1 89.64%
service/history/execution/mutable_state_task_refresher.go 1 73.82%
client/history/client.go 2 40.3%
client/history/metricClient.go 2 45.94%
common/types/mapper/thrift/shared.go 2 63.43%
service/history/handler.go 2 48.42%
service/history/queue/timer_queue_processor.go 2 58.8%
service/matching/matcher.go 2 91.46%
common/cache/lru.go 3 90.73%
common/persistence/nosql/nosqlplugin/cassandra/workflow.go 3 55.49%
Totals Coverage Status
Change from base Build fc6b58f8-7517-4e22-ad79-b3b4ec4f0150: -0.08%
Covered Lines: 82306
Relevant Lines: 144781

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants