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

[Feature Request] Async #48

Open
wlzch opened this issue Aug 28, 2018 · 1 comment
Open

[Feature Request] Async #48

wlzch opened this issue Aug 28, 2018 · 1 comment

Comments

@wlzch
Copy link

wlzch commented Aug 28, 2018

Hi,

Is it possible to forward the logging to queue system (for example rabbitmq)? I'm afraid that flushing the logs on the same transaction will slow it down. By forwarding it to queue system on post flush, it will fasten the process while still have the logging feature.

Thanks.

@l3pp4rd
Copy link
Member

l3pp4rd commented Aug 28, 2018

Hi, all audit logs are always committed within the same database transaction, when flush is invoked.

What it means is, that everything will be atomic (if something fails to be written in database, everything fails) you will never anticipate data inconsistency if you will perform only one flush during a HTTP request, which is of course how everything should be done. Also the speed of executing single transaction is almost the same as without audit logs.

Please make performance tests to have an argument, that audit logs make your transaction reasonably slower. Being afraid is not a good argument, I suggest to be more careful with premature abstraction and usage with queues, queues add way more complexity. In case if you decide that you need async anyway, then just fork it.

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