-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(worker_event): send large payload #11117
Conversation
to be sent in events lib. In some cases, Kong needs to send big payload. For example dao:crud rely on events to invalidate cache. In these cases, the size of the payload may exceeds the limit due to a large dao entity. In this PR, the `post` method of the worker_events is overwritten to take a retry action when we get the 'payload too big' error message, and the retry action is just to re-post the event with a truncated payload so that the subsequent logic that relies on the event could have a chance to be informed rather than unware at all. Based on this purpose, the retry action is taken and only takn once when the error happens. FTI-4963 KAG-1523
Co-authored-by: Chrono <chrono_cpp@me.com>
Co-authored-by: Chrono <chrono_cpp@me.com>
Co-authored-by: Chrono <chrono_cpp@me.com>
Co-authored-by: Chrono <chrono_cpp@me.com>
Co-authored-by: Chrono <chrono_cpp@me.com>
Co-authored-by: Chrono <chrono_cpp@me.com>
using worker_event lib. This limit prevent `too big` payload from being published through worker_event. This PR provide a solution for this case. The payload will be sent in serval smaller frame when the payload exceeds the limit, and they will be assembled at the side of the receiver. FTI-4963
It seems to be a complex solution? should we increase the limitation of lua-resty-events? |
1da96fe
to
f81fafa
Compare
@chronolaw glad to see that, so set this as a draft |
PR Kong/lua-resty-events#37 increase the limitatioin to 16MB, do you think it is enough? |
PR #11203 will replace this PR, waiting the final decision. |
We made a decision to add a new parameter for specifying the limit in worker_events, referring to Kong/lua-resty-events#37, this PR can be closed. |
Summary
There is a limit for the size of the payload when using worker_event lib. This limit prevent
too big
payload from being published through worker_event. This PR provide a solution for this case. The payload will be sent in serval smaller frame when the payload exceeds the limit, and they will be assembled at the side of the receiver.Checklist
Full changelog
Issue reference
FTI-4963