-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
design doc/ordering constraint removal #3268
Conversation
Should file name be |
|
||
In order to mitigate this, there are a few options (not mutually exclusive): | ||
1) Lower the valid acceptance range | ||
2) Create an _active_ validity window, such as `[most_recent_sample-max_chunk_age, now() + creation_grace_period]`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could someone work around this by ingesting samples in decreasing order of timestamp?
But I think this is a good enough approach for now without adding a lot of complexity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the overall idea without adding a lot of complexity and without altering the performance benefits that users get who are sending ordered logs.
Addresses #1544 |
2) Create an _active_ validity window, such as `[most_recent_sample-max_chunk_age, now() + creation_grace_period]`. | ||
|
||
The first option is simple, already available, and likely somewhat reasonable. | ||
The second is simple to implement and an effective way to ensure Loki can ingest unordered logs but maintain a sliding validity window. I expect this to cover nearly all reasonable use cases and effectively mitigate bad actors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do that. If we don't restraint the boundary of a chunks, it will appear too often for queries and will lead to bad performance.
As of today the only way to have overlapping time between chunk of the same stream is replication. I believe this won't be true anymore. (Not a big problem just a statement.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I fully intend to use the second strategy here to slowly cinch the validity window. This will allow relatively out of order writes while preventing bad actors from writing samples i.e. one week apart over and over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have doubt about synchronization but I guess we can tackle that once it's a problem.
It would be really useful to have this implemented. Currently Loki is limited to use cases where log sources guarantee time stamp ordering. |
This would be a game changer as far as allowing Loki to fit into complex log aggregation scenarios. We've had to break our |
Intending to work on this as soon as scheduling permits 🎉 |
This contains a proposed design doc for removing the ordering constraint in Loki.