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

metadata size limit? #186

Open
ahmed-adam opened this issue Jan 26, 2023 · 2 comments
Open

metadata size limit? #186

ahmed-adam opened this issue Jan 26, 2023 · 2 comments

Comments

@ahmed-adam
Copy link

Hello,

I'm using the get_property() function to retrieve some cluster metadata. The value is a large string about 2MB in size. Everything works as expected, but I saw a reference to a 1M size limit in the envoy docs. Is this limit referring to cluster_metadata or to something else?

Are there any issues with passing a 2mb value to a wasm filter via cluster metadata or is there an alternative anyone can recommend? (The data is actually from the crl used to configure an envoy validation_context, but I couldn't see any way to access that from the filter).

Thanks

@PiotrSikora
Copy link
Member

The limit you've linked to refers to the HTTP/2 METADATA frame size (see the document name). AFAIK, it's unrelated to cluster metadata or anything else in Envoy.

The only(?) concern is that you're copying 2 MB between host and Proxy-Wasm plugin each time you're accessing this data, so there is some performance overhead.

As for the alternatives, it might be easier to suggest something if you describe your use case.

@ahmed-adam
Copy link
Author

Hi @PiotrSikora , thanks for the prompt response.

Also thanks for the heads up re: performance overhead. We will do some testing to evaluate the impact.

We're using a wasm filter to check an x509 cert against a CRL. The cert is passed in via a request header, and the CRL lives on the local filesystem (stored there by an external process).

Initially, we tried to get the CRL over HTTP when the filter starts, but we didn't want to duplicate retry logic and failure handling, which is already handled by the external process (envoy only starts if that process runs successfully). So the next approach was to take the contents of the file and add them to the wasm filter's config or metadata. We chose metadata because there will likely be additional filters in future that will make use of the CRL data.

Grateful for any suggestions!

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