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

Handling of long query strings #153

Closed
wemeetagain opened this issue Jun 23, 2021 · 2 comments
Closed

Handling of long query strings #153

wemeetagain opened this issue Jun 23, 2021 · 2 comments

Comments

@wemeetagain
Copy link

Some of the endpoints that use query strings don't play well with large numbers of validators.

eg:
GET /eth/v1/beacon/states/{state_id}/validators called with several hundred pubkeys

To work around the issue, we batch requests to these endpoints.

As I understand it, we want to use GET to take advantage of caching, and so have no standard possibility of using the request body in these endpoints.

I'm wondering if there's any place in the spec that should be standardized around handling of these issues.

Possible actions:

  • Add an explicit limit on # of entries allowed
  • Add mostly-duplicate POST endpoints that put query data in the request body, allowing any number of validators
@mcdee
Copy link
Contributor

mcdee commented Jun 23, 2021

Batching GETs is the best option for most of the items. We do have a couple of requests that use POST instead of batched GETs, as it's in the validator endpoint set and so better performance is required.

Regarding standardisation of the limit: I think that when we looked at this we decided that a total URL length of no more than 8,000 bytes was safe. It may be worth putting that somewhere as an implementation note, but given that there could always be a cache, proxy or whatever in the way with a lower limit I don't think we are able to state that requests up to that size are guaranteed to work.

@dapplion
Copy link
Collaborator

dapplion commented Dec 8, 2023

@dapplion dapplion closed this as completed Dec 8, 2023
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

3 participants