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

Should we remove load-balancing and failover/retry logic from document-centered reporting? #196

Closed
clelland opened this issue Jan 13, 2020 · 4 comments

Comments

@clelland
Copy link
Contributor

It's been discussed previously that no other web API handles retries of failed requests or load-balancing between different endpoints in the way that the Reporting spec currently does, and that maybe we should remove that complexity from the base spec.

It's clear (at least to me) that the primary motivation for it is Network Error logging, where the very conditions that make reporting necessary also mean that one-shot delivery to a single endpoint is inherently unreliable. So we definitely need those constructs there. But are they useful for CSP / Policy / Deprecation / Crash reports as well?

If we remove all of that, then an endpoint definition becomes essentially just a URL. No priority, weight, failures, retry-after or pending. With even load balancing gone, there doesn't seem to be a case for multiple endpoints in a group. Presumably, all load balancing could be done at the endpoint using DNS or routing techniques.

If client-side load balancing is useful, then we should keep the endpoint group concept, as well as priority and weight.

If failover / retry is also still useful, then we should keep everything, either in this spec, or perhaps figure out how to move it into fetch as a general mechanism.

@clelland
Copy link
Contributor Author

@dcreager , @igrigorik -- do either of you have an opinion on this?

@dcreager
Copy link
Member

NEL definitely needs load balancing, failover, and retries to all be implemented client-side, but I agree that all of the per-document reporting use cases can get away with a single upload URL and all of that stuff handled server-side. So I'm 👍 to removing load balancing and failover from the per-document Reporting spec.

Retries I could see going either way. If we're still going to keep batching of reports in the per-document Reporting spec, then retrying those batched uploads up to X times if they fail doesn't add that much complexity. (For instance, we'd already have to work out hard caps on how long we queue up a batch for, so we could use that same hard cap for how long to retry a batch upload for.)

I also suggested over in #191 (comment) that if NEL is really the only spec that needs the client-side complexity, there's no need to have it be in a separate spec — let's just put that directly in NEL itself.

@clelland
Copy link
Contributor Author

So, without this, it sounds like there is no more need for endpoint groups in per-document reporting to contain more than a single endpoint.

If we simplify it to that extent, the report-to header becomes essentially just a mapping of names to URLs, providing those names to other mechanisms that want to direct reports.

I'll update the PR accordingly.

@clelland
Copy link
Contributor Author

clelland commented Feb 5, 2020

Updated now; the basic reporting spec now has no more concept of 'groups', that is specified completely in network reporting. Similarly, retries and failover have been removed.

@clelland clelland closed this as completed Mar 3, 2020
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

No branches or pull requests

2 participants