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

Partition HTTP requests to loki by stream for improved throughput #6041

Closed
jszwedko opened this issue Jan 14, 2021 · 7 comments · Fixed by #8615
Closed

Partition HTTP requests to loki by stream for improved throughput #6041

jszwedko opened this issue Jan 14, 2021 · 7 comments · Fixed by #8615
Assignees
Labels
sink: loki Anything `loki` sink related type: enhancement A value-adding code change that enhances its existing functionality.

Comments

@jszwedko
Copy link
Member

jszwedko commented Jan 14, 2021

Broken off from #5973 (comment)

Right now users are limited to only sending one HTTP request at a time to Loki due to the ordering requirements Loki has around streams which result in possible failures when requests are issued in parallel for a given stream. This constrains the throughput vector is able to achieve.

#5973 improves this situation by letting users modify the behavior on failure by, for example, rewriting the timestamps but I think it would be advantageous to modify the loki sink to batch partition HTTP requests by stream to increase throughput by allowing multiple HTTP requests for different streams to be issued simultaneously.

@jszwedko jszwedko added type: enhancement A value-adding code change that enhances its existing functionality. sink: loki Anything `loki` sink related labels Jan 14, 2021
@jszwedko
Copy link
Member Author

Discussion in discord with a user that would benefit from this: https://discord.com/channels/742820443487993987/746070591097798688/799285661449322537

@binarylogic binarylogic added this to the 2021-01-18 Tabula E-Rasa milestone Jan 14, 2021
@spencergilbert
Copy link
Contributor

This would be great :)

@wgb1990
Copy link

wgb1990 commented Mar 3, 2021

@jszwedko Hello, what can this feature plan to support, the throughput of vector cannot be improved at present

@jszwedko
Copy link
Member Author

jszwedko commented Mar 3, 2021

Hi @wgb1990. This feature hasn't been scheduled yet.

@binarylogic binarylogic removed this from the 2021-02-01 D-Fuel milestone Mar 3, 2021
@jszwedko
Copy link
Member Author

@jszwedko jszwedko added this to the Vector 0.13 milestone Mar 17, 2021
@ctorrisi
Copy link

ctorrisi commented Mar 30, 2021

@jszwedko As part of #5973, the request.concurrency configuration was disabled as a workaround to eliminate out-of-order issues. Although this eliminates out-of-order issues in Loki, it also reduces overall throughput. You made a review comment stating:

Instead of hard-coding to 1, maybe we could still let users set it if they really know what they are doing, but output a warning?

I would preference this to be a warning instead of a hard-coded value. Perhaps this should be included as part of the documentation rather than limiting the performance of vector?

In addition, there is progress in Loki to provide some leniency around out-of-order log submissions.

Is there a chance we could get request.concurrency re-enabled with a warning and/or documentation for users who may not understand the implications of increasing this value?

@jszwedko
Copy link
Member Author

@ctorrisi agreed, I opened #6932 to track that work. Thanks for suggesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink: loki Anything `loki` sink related type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
7 participants