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

Add asynchronous requests to client #33

Closed
2opremio opened this issue Jun 12, 2016 · 0 comments · Fixed by #56
Closed

Add asynchronous requests to client #33

2opremio opened this issue Jun 12, 2016 · 0 comments · Fixed by #56

Comments

@2opremio
Copy link

2opremio commented Jun 12, 2016

As a user who is instrumenting a service with fluent logging, I am concerned about blocking requests affecting my service in different scenarios:

  1. The fluentd server going down or degrading.
  2. Fluent requests slowing down the requests being processed by my service. I'd rather stop logging than degrading the performance of my service.

As a result I ended up incorporating asynchronous logging through a worker goroutine reading from a small memory buffer on top of your Go client. If the buffer gets full for whatever reason (logging slowing down, fluent going down ...), events will get dropped but the service won't be affected.

Admittedly, if my service goes down, the events inside the buffer will be lost, but I am perfectly fine with that.

I believe others would benefit from this scheme and probably should be shipped by default with the client.

My code is pretty ad-hoc at this point but I may consider cleaning it up and upstreaming it at some point.

@2opremio 2opremio changed the title Add buffering to client Add buffering/asynchronous requests to client Jun 12, 2016
@2opremio 2opremio changed the title Add buffering/asynchronous requests to client Add asynchronous requests to client Jun 12, 2016
@alexlry alexlry mentioned this issue Jul 12, 2017
@alexlry alexlry mentioned this issue Apr 9, 2018
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

Successfully merging a pull request may close this issue.

1 participant