Skip to content

Conversation

@dongjiang1989
Copy link
Contributor

Description

Which issue(s) this PR fixes:

Fixes #3231 #6687

Add zookeeper discovery

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dongjiang1989 dongjiang1989 changed the title feat: Add zookeeper discovery feat(disvocery): Add zookeeper discovery Nov 24, 2025
@dongjiang1989 dongjiang1989 force-pushed the add-zookeeper-discovery branch from 7bfba46 to 01f70df Compare November 24, 2025 11:43
@dongjiang1989 dongjiang1989 marked this pull request as ready for review November 24, 2025 12:29
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Nov 24, 2025
Copy link
Contributor

@Baoyuantop Baoyuantop left a comment

Choose a reason for hiding this comment

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

Hi @dongjiang1989, thanks for your contribution. Could you add documentation and testing for this feature? You can refer to other service discovery modules for reference.

@dongjiang1989
Copy link
Contributor Author

Hi @dongjiang1989, thanks for your contribution. Could you add documentation and testing for this feature? You can refer to other service discovery modules for reference.

Thanks @Baoyuantop
Documentation and Testing will coming

@dongjiang1989 dongjiang1989 force-pushed the add-zookeeper-discovery branch 3 times, most recently from 3993d37 to ea3c33e Compare November 26, 2025 02:24
@dosubot dosubot bot removed the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 26, 2025
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

add zookeeper discovery docs

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 26, 2025
@dongjiang1989 dongjiang1989 force-pushed the add-zookeeper-discovery branch from f25602f to 3435db2 Compare November 26, 2025 03:22
@dongjiang1989
Copy link
Contributor Author

@Baoyuantop Please review docs, thanks

@Baoyuantop
Copy link
Contributor

Hi @dongjiang1989, additional tests are needed to verify that the function works correctly.

instance_cache:flush_all()
log.info("zookeeper discovery destroyed")
end

Copy link
Contributor

Choose a reason for hiding this comment

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

A dump method is also needed to retrieve all services in the current service discovery instance. You can explore other service discovery modules for more information.

}

-- Global Configuration
local local_conf
Copy link
Contributor

Choose a reason for hiding this comment

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

It is recommended that the main process request the service instance from ZooKeeper and synchronize it to the worker processes via the shared dict.

@dongjiang1989
Copy link
Contributor Author

Hi @dongjiang1989, additional tests are needed to verify that the function works correctly.

Got it. I'll add UT soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request help: how to use apisix with zookeeper service discovery

2 participants