Giter Site home page Giter Site logo

Comments (3)

cosmo0920 avatar cosmo0920 commented on August 23, 2024

Because fruently does not send message with chunk option.
Fluentd forward protocol v1 (and v0) requests that server SHOULD close the connection silently with no response when the chunk option is not sent.

ref: https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#response

from fruently.

jgrimes avatar jgrimes commented on August 23, 2024

Thanks for the response.

I was prompted to look into this due to very high CPU usage by fluentd workers. I made a fork and changed fruently's code to just maintain a single connection and saw CPU usage drop to .2x what it was previously on an 8 core machine with 8 workers. From about 400% to 75-90%. Nothing changed in fluentd's behavior other than that.

The part you mentioned is for the server side of the protocol, right? It seems odd to me to close the client connection after every message given the costs associated with it. There is also mention of keep-alive in the protocol docs. Note: not arguing with the protocol, just trying to figure out if it is indeed their intention to have the client close the connection after every message.

from fruently.

cosmo0920 avatar cosmo0920 commented on August 23, 2024

Yep, this is server side.
But your implementation is dangerous.
If you want to use single connection on Forward protocol, you must implement require ack response mechanisim.
A patch which implements this mechanisim should be acceptable.

from fruently.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.