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

KAFKA-18842: add configurable max number of connectors #63

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

jjaakola-aiven
Copy link

When Kafka Connect is offered as managed services there is need to restrict the number of allowed connectors to be run in the Connect cluster. Creating high number of connectors will make the Connect cluster unresponsive.

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@jjaakola-aiven jjaakola-aiven force-pushed the jjaakola-aiven-add-connect-connector-count-limit branch from 0920327 to a138485 Compare February 21, 2025 09:24
@jjaakola-aiven jjaakola-aiven changed the title feat: add configurable max number of connectors KAFKA-18842: add configurable max number of connectors Feb 21, 2025
@@ -140,6 +140,10 @@ public Response listConnectors(
public Response createConnector(final @Parameter(hidden = true) @QueryParam("forward") Boolean forward,
final @Context HttpHeaders headers,
final CreateConnectorRequest createRequest) throws Throwable {
if (!herder.validateConnectorNumberLimitNotExceeded()) {
return Response.status(Response.Status.CONFLICT).entity("Number of connectors is at maximum.").build();
Copy link

@keejon keejon Feb 21, 2025

Choose a reason for hiding this comment

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

For the sake of consistency would it be better to throw ConnectRestException here?

Copy link
Author

Choose a reason for hiding this comment

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

Good point, I'll look into this.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

When Kafka Connect is offered as managed services there is need to restrict the
number of allowed connectors to be run in the Connect cluster. Creating high
number of connectors will make the Connect cluster unresponsive.
@jjaakola-aiven jjaakola-aiven force-pushed the jjaakola-aiven-add-connect-connector-count-limit branch from a138485 to 1da9e4f Compare February 21, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants