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

HTTP server for extensions #3459

Open
szkiba opened this issue Nov 20, 2023 · 1 comment
Open

HTTP server for extensions #3459

szkiba opened this issue Nov 20, 2023 · 1 comment
Labels
awaiting user waiting for user to respond feature

Comments

@szkiba
Copy link
Contributor

szkiba commented Nov 20, 2023

Feature Description

Certain extensions (primarily output extensions) provide services available via the HTTP protocol (REST API, HTML pages, etc.). These extensions start their own HTTP server on different ports. It would be useful to provide a common HTTP server within the k6 process that can be used by extensions.

FYI @oleiade

Suggested Solution (optional)

At startup, k6 also starts an HTTP server (default port 6565) for REST API service. It seems logical to make this HTTP server available to extensions via an API. Using this API, extensions could register an HTTP handler for a given route.

Already existing or connected issues / PRs (optional)

No response

@mstoykov
Copy link
Contributor

Sorry for the slow reply 🙇.

I think we discussed this in private for the specific case of the web dashboard and decided that it is not a great idea to have both a controlling and not controlling API on the same port. Especially if people decide to export and share the web dashboard endpoint.

From my perspective that will be the case for more or less every other case as well.
Another thing is that the major reason to export endpoint so far has been stuff such metric outputs, for example prometheus scraping. And those already have well known ports that they are expected on.

So from UX perspective it seems like most cases will just never want to add an endpoint under the k6 REST API.

I currently don't see a good case for this, so if we are not going to need it for the web dashboard I am for closing this.

@mstoykov mstoykov added awaiting user waiting for user to respond and removed triage labels Jan 10, 2024
@mstoykov mstoykov removed their assignment Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting user waiting for user to respond feature
Projects
None yet
Development

No branches or pull requests

2 participants