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

Fix handling of multiple Kafka hosts when creating alarm tree #3072

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

smarsching
Copy link
Contributor

When multiple Kafka hosts are specified as part of the alarm URI, the URI cannot be parsed as a server-based URI, only as a registry-based URI. This means that the getHosts(), getPort(), and getUserInfo() methods return null. Therefore, we have to use getAuthority() instead when cloning the URI.

This PR closes #3071.

When multiple Kafka hosts are specified as part of the alarm URI, the
URI cannot be parsed as a server-based URI, only as a registry-based
URI. This means that the getHosts(), getPort(), and getUserInfo()
methods return null. Therefore, we have to use getAuthority() instead
when cloning the URI.

This closes ControlSystemStudio#3071.
Copy link
Collaborator

@kasemir kasemir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks benign.

I wonder how you're using this. Do you have a cluster with several kafka nodes? Do you still get one compacted topic for an alarm configuration, or is the kafka log split across the nodes?

@smarsching
Copy link
Contributor Author

I wonder how you're using this. Do you have a cluster with several kafka nodes? Do you still get one compacted topic for an alarm configuration, or is the kafka log split across the nodes?

We use this for high availability, so that we can restart Kafka nodes without affecting operation of the alarm system.

We have three Kafka nodes (using two does not make any sense when running KRaft mode because Kafka needs a quorum of controller nodes). As we have them anyway and all our nodes act as both controller and broker nodes, we replicate all topics across all three nodes.

This way, the number of in-sync replicas can be kept at two, even when one node fails (see https://stackoverflow.com/a/58909999/2326830 for a slightly more detailed explanation). This follows recommendations for production setups from the Kakfa documentation.

Adding additional broker nodes and splitting topics IMO does not make any sense in the context of the alarm system: This method is mainly employed in order to get a higher throughput in case of massively parallel requests, and this scenario does not really apply to the alarm system.

@shroffk
Copy link
Member

shroffk commented Jul 15, 2024

@kasemir should we reference this somewhere in the alarm server installation/deployment documentation?

@shroffk shroffk merged commit 6a6c5be into ControlSystemStudio:master Jul 15, 2024
1 check passed
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.

Alarm tree view cannot be created when using multiple Kafka servers
3 participants