diff --git a/.changeset/2600.md b/.changeset/2600.md new file mode 100644 index 0000000000..9251fb2d9d --- /dev/null +++ b/.changeset/2600.md @@ -0,0 +1,18 @@ +--- +'@backstage/plugin-techdocs-backend': minor +'@backstage/plugin-proxy-backend': minor +'@backstage/plugin-auth-backend': minor +'@backstage/create-app': minor +'@backstage/backend-common': minor +--- +Add service discovery interface and implement for single host deployments + +Fixes #1847, #2596 + +Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. + +Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. + +This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine tbh, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. + +Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but tbh I don't think there are many since it's been pretty awkward to do service-to-service communication.