openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
262 stars 115 forks source link

Support piping long log lines from the function #107

Closed LucasRoesler closed 10 months ago

LucasRoesler commented 4 years ago

Description

Motivation and Context

Resolves #100

How Has This Been Tested?

A new unit test has been added

Types of changes

Checklist:

alexellis commented 4 years ago

Whilst I think this patch should be merged, it does also add a lot of complexity and maintenance overhead.

Would making the total buffer size configurable per function (retaining the default) also fix the issue?

LucasRoesler commented 4 years ago

Whilst I think this patch should be merged, it does also add a lot of complexity and maintenance overhead.

Would making the total buffer size configurable per function (retaining the default) also fix the issue?

Most of the complexity in this change comes from the fact that of-watchdog uses log instead of just printing to stdout, if we are willing to make a breaking change, we can simplify this a lot.

I don't think just configuring the buffer size is going to be a great dev experience because what would otherwise be a successful function request could instead completely crash an instance without much warning just because of logging. Making it configurable means it could be resolved for each case, but we will continue to see questions about it (even if we document it)