Closed CarbonC closed 3 years ago
@CarbonC in order for us to consider your issue, you will need to provide a full and complete issue template, you haven't done that so could you take some time to improve this issue?
https://raw.githubusercontent.com/openfaas/faas-netes/master/.github/ISSUE_TEMPLATE.md
Alex
Sorry I took that long, here is the completed template:
It is impossible to modify NATS streaming maximum payload from the chart. In some use cases you might want to put it to more than the default 1Mb
You should be able to pass a command line argument to increase the limit of NATS streaming payload
Being able to pass a value different than the default one of 1mb would allow nats to accept bigger chunks of data and forward them to openfaas functions correctly
I implemented a solution that works very well on my stack on #735
If you want to see why its limiting, just increase nginx default payload limit, then send a payload of more than 1mb to an openfaas async function
I'm using openfaas functions to treat some chunks of IOT data, that are mostly around a few hundred kb but some are a bit bigger, up to 5mb maybe.
faas-cli version
):
CLI:
commit: 598336a0cad38a79d5466e6a3a9aebab4fc61ba9
version: 0.12.21Gateway uri: https://openfaas.getmoona.com version: 0.20.2 sha: 9bbb25e3c7c4cc5cd355edb3a122f8c7812e32db commit: Fix a bug that caused the services list to keep growing
Provider name: faas-netes orchestration: kubernetes version: 0.12.12 sha: 43f64cf9b30fd5f0f56514dee6b9fe01cfbfed45
What version and distriubtion of Kubernetes are you using? kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 20.04
Link to your project or a code
example to reproduce issue: https://github.com/getmoona/faas-netes
What network driver are you using and what CIDR? i.e. Weave net / Flannel
@alexellis What could i do to help integrate the change in the repo? Looks like the issue is stale...
We're sympathetic to the use-case, but if you look at your PR, you can see why we are reticent to merge a change like this. A user has already started putting 20MB messages into the NATS queue which it is not designed to support.
Large messages need to be offloaded to Minio / S3, which is trivial to do. Feel free to take a look into Minio usage and setup here -> https://github.com/alexellis/mqtt-to-s3
Alex
To quote StackOverflow:
NATS does have a message size limitation that is enforced by the server and communicated to the client during connection setup. Currently, the limit is 1MB.
Specifically:
Messaging systems are not supposed to be used for file transfer. Use a distributed storage service to hold files and pass file ID in the message.
There is a reason why AWS Lambda is also designed this way, with 6MB for synchronous and 128KB for async.
FYI we have updated the docs to make this limit clearer. We discussed this as a group, and would suggest deploying your own separate NATS server and configuration, outside of the chart. We won't be able to give technical support for users who have increased this limit, and don't want to encourage it in any way by making it part of the upstream chart.
Happy to talk to users on Slack who need assistance dealing with large payloads, or understanding how to offload them to a database or S3 bucket for processing.
@alexellis Thanks for the update. I get your point. I still believe that my personal use case of up to 5mb is legit since the proportion of messages that weight more than 1mb is small. But obviously you can't let people send big files to nats and then have to provide support. I just wish there was a way to allow custom config files for every part of the chart with clear disclaimer that you wont support instead of just limiting the open source project to what you can support :/
Sorry I took that long, here is the completed template:
It is impossible to modify NATS streaming maximum payload from the chart. In some use cases you might want to put it to more than the default 1Mb
Expected Behaviour
You should be able to pass a command line argument to increase the limit of NATS streaming payload
Current Behaviour
Being able to pass a value different than the default one of 1mb would allow nats to accept bigger chunks of data and forward them to openfaas functions correctly
Possible Solution
I implemented a solution that works very well on my stack on #735
Steps to Reproduce (for bugs)
If you want to see why its limiting, just increase nginx default payload limit, then send a payload of more than 1mb to an openfaas async function
Context
I'm using openfaas functions to treat some chunks of IOT data, that are mostly around a few hundred kb but some are a bit bigger, up to 5mb maybe.
Your Environment
faas-cli version
): CLI: commit: 598336a0cad38a79d5466e6a3a9aebab4fc61ba9 version: 0.12.21Gateway uri: https://openfaas.getmoona.com version: 0.20.2 sha: 9bbb25e3c7c4cc5cd355edb3a122f8c7812e32db commit: Fix a bug that caused the services list to keep growing
Provider name: faas-netes orchestration: kubernetes version: 0.12.12 sha: 43f64cf9b30fd5f0f56514dee6b9fe01cfbfed45
What version and distriubtion of Kubernetes are you using?
kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 20.04
Link to your project or a code
example to reproduce issue: https://github.com/getmoona/faas-netes
What network driver are you using and what CIDR? i.e. Weave net / Flannel