-
Notifications
You must be signed in to change notification settings - Fork 120
docs: add "Architecture and Load Balancers" #2574
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e42706b
docs: add Architecture and Load Balancers
mstopa-splunk 4a658b5
Add nginx plus description
mstopa-splunk 1365167
post-review fixes
mstopa-splunk fe12c49
Fix formatting
mstopa-splunk de3483c
Fix nginx link
mstopa-splunk 2c28181
Update reference link
mstopa-splunk 1c06948
Update nginx.md
mstopa-splunk 9255f2f
Merge branch 'main' into nginx_with_sc4s
mstopa-splunk 7da6f8e
Address code review comments
mstopa-splunk a68926c
Remove redundant doc section
mstopa-splunk bf90e4f
Fix typos
mstopa-splunk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,56 @@ | ||
| # Architectural Considerations | ||
|
|
||
| Building a syslog ingestion architecture is complex and requires careful planning. The syslog protocol prioritizes speed and efficiency, often at the expense of resiliency and reliability. Due to these trade-offs, traditional scaling methods may not be directly applicable to syslog. | ||
|
|
||
| This document outlines recommended architectural solutions, along with alternative or unsupported methods that some users have found viable. | ||
|
|
||
| ## Edge vs. Centralized Collection | ||
|
|
||
| While TCP and TLS are supported, UDP remains the dominant protocol for syslog transport in many data centers. Since syslog is a "send and forget" protocol, it performs poorly when routed through complex network infrastructures, including front-end load balancers and WAN. | ||
|
|
||
| The most reliable way to gather syslog traffic is through edge collection rather than centralized collection. When the syslog server is centrally located, UDP and stateless TCP traffic cannot adapt, leading to potential data loss. | ||
|
|
||
| For optimal reliability, deploy SC4S instances in the same VLAN as the source devices. | ||
|
|
||
| ## Avoid Load Balancing for Syslog | ||
|
|
||
| For optimal performance, scale vertically by fine-tuning a single, robust server. Key tools and methods for enhancing performance on your SC4S server are documented in: | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. [Fine-tune for TCP](tcp-optimization.md) | ||
| 2. [Fine-tune for UDP](udp-optimization.md) | ||
|
|
||
| We advise against co-locating syslog-ng servers for horizontal scaling with load balancers. The challenges of load balancing for horizontal scaling are outlined in the [Load Balancer's Overview](lb/index.md) section. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## High Availability (HA) Considerations | ||
|
|
||
| Syslog, being prone to data loss, can only achieve "mostly available" data collection. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### HA Without Load Balancers | ||
|
|
||
| Load balancing does not suit syslog’s stateless, unacknowledged traffic. More data is preserved with simpler designs, such as vMotioned VMs. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The optimal deployment model for high availability uses a [Microk8s](https://microk8s.io/) setup with MetalLB in BGP mode. This method implements load balancing through destination network translation, providing better HA results. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## UDP vs. TCP | ||
|
|
||
| Syslog optimally uses UDP for log forwarding due to its low overhead and simplicity. UDP's streaming nature eliminates the need for network session establishment, which reduces network strain and avoids complex verification processes. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Drawbacks of TCP | ||
|
|
||
| While TCP uses acknowledgement signals (ACKS) to mitigate data loss, issues still arise, such as: | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Loss of events during TCP session establishment | ||
| - Slow acknowledgment signals leading to buffer overflows | ||
| - Lost acknowledgments causing closed connections | ||
| - Data loss during server restarts | ||
|
|
||
mstopa-splunk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ### When to Use UDP vs. TCP | ||
|
|
||
| SC4S supports syslog ingestion via UDP, TCP/TLS, or a combination of both, leaving the choice to the system administrator. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| While UDP can be used by default for syslog forwarding, it’s not mandatory. TCP is often preferable for larger syslog events that exceed UDP packet limits, such as those from Web Proxy, DLP, or IDS sources. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The following resources can help you determine the best protocol for your setup: | ||
|
|
||
| 1. [Run performance tests for TCP](performance-tests.md#check-your-tcp-performance) | ||
| 2. [Run performance tests for UDP](performance-tests.md#check-your-udp-performance) | ||
This file contains hidden or 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,18 @@ | ||
| # Load Balancers Are Not a Best Practice for SC4S | ||
| Be aware of the following issues that may arise from load balancing syslog traffic: | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Load balancing for scale can lead to increased data loss due to normal device operations and buffer overflows. | ||
| - Front-side load balancing often results in uneven data distribution on the upstream side. | ||
| - The default behavior of many load balancers is to overwrite the client's source IP with their own. Preserving the real source IP requires additional configuration. | ||
|
|
||
mstopa-splunk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ### Recommendations for Using Load Balancers: | ||
| - Preserve the actual source IP of the sending device. | ||
| - Avoid using load balancers without High Availability (HA) mode. | ||
| - TCP/TLS load balancers often do not account for the load on individual connections and may favor one instance over others. Ensure all members in a resource pool are vertically scaled to handle the full workload. | ||
|
|
||
mstopa-splunk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| For **TCP**, you can use either a DNAT configuration or SNAT with the "PROXY" protocol enabled by setting `SC4S_SOURCE_PROXYCONNECT=yes`. | ||
| For **UDP**, traffic can only pass through a load balancer using DNAT. | ||
|
|
||
| This section of the documentation discusses various load balancing solutions and example configurations, along with known issues. | ||
mstopa-splunk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Please note that load balancing syslog traffic in front of SC4S is not supported by Splunk, and additional support from the load balancer vendor may be required. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.