-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add worker pool for log pushers (#1499)
- Loading branch information
Showing
26 changed files
with
2,061 additions
and
887 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Amazon CloudWatch Logs Output Plugin | ||
|
||
For each configured target (log group/stream), the output plugin maintains a queue for log events that it batches. | ||
Once each batch is full or the flush interval is reached, the current batch is sent using the PutLogEvents API to Amazon CloudWatch. | ||
|
||
When concurrency is enabled, the pusher uses a shared worker pool to allow multiple concurrent sends. | ||
``` | ||
Target #1 (Log Group/Stream) ┌──Shared Worker Pool──┐ | ||
┌──────────────────────────────────────────────────────────────────┐ │ │ | ||
│ │ │ ┌──Worker 1──┐ │ | ||
│ ┌────────Event Queue────────┐ ┌─────────Batch─────────┐ │ │ │ ┌────────┐ │ │ | ||
│ │ │ │ ┌───────────────────┐ │ │ ┌──────┼───►│ │ Sender │ │ │ | ||
│ │ ┌───┐ ┌───┐┌───┐┌───┐ │ │ │ │ │ │ │ │ │ └────────┘ │ │ | ||
AddEvent───│───►│ │ n │ ... │ 3 ││ 2 ││ 1 │ ├─────►│ │ PutLogEventsInput │ ├──┼────┤ │ └────────────┘ │ | ||
│ │ └───┘ └───┘└───┘└───┘ │ │ │ │ │ │ │ │ │ | ||
│ │ │ │ └───────────────────┘ │ │ │ │ ┌──Worker 2──┐ │ | ||
│ └───────────────────────────┘ └───────────────────────┘ │ │ │ │ ┌────────┐ │ │ | ||
│ │ ┼──────┼───►│ │ Sender │ │ │ | ||
└──────────────────────────────────────────────────────────────────┘ │ │ │ └────────┘ │ │ | ||
│ │ └────────────┘ │ | ||
│ │ │ | ||
Target #2 (Log Group/Stream) │ │ . │ | ||
┌──────────────────────────────────────────────────────────────────┐ │ │ . │ | ||
│ │ │ │ . │ | ||
│ ┌────────Event Queue────────┐ ┌─────────Batch─────────┐ │ │ │ │ | ||
│ │ │ │ ┌───────────────────┐ │ │ │ │ │ | ||
│ │ ┌───┐ ┌───┐┌───┐┌───┐ │ │ │ │ │ │ │ │ ┌──Worker n──┐ │ | ||
AddEvent───│───►│ │ n │ ... │ 3 ││ 2 ││ 1 │ ├─────►│ │ PutLogEventsInput │ ├──┼────┤ │ │ ┌────────┐ │ │ | ||
│ │ └───┘ └───┘└───┘└───┘ │ │ │ │ │ │ └──────┼───►│ │ Sender │ │ │ | ||
│ │ │ │ └───────────────────┘ │ │ │ │ └────────┘ │ │ | ||
│ └───────────────────────────┘ └───────────────────────┘ │ │ └────────────┘ │ | ||
│ │ │ │ | ||
└──────────────────────────────────────────────────────────────────┘ └──────────────────────┘ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.