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

docs: add "Architecture and Load Balancers" #2574

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mstopa-splunk
Copy link
Contributor

No description provided.


# Define a common configuration block for all servers
map $server_port $upstream_name {
514 stream_syslog_514;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we also need tell that we can use port segregation, it will increase performance:

SC4S_LISTEN_DEFAULT_TCP_PORT=514,515,516,517

@ikheifets-splunk
Copy link
Contributor

@mstopa-splunk @rjha-splunk Are we have a plan to create ansible playbook that will bootstrap sc4s instances with LB?
I understanding that some of the settings are optional, but are we have such plans?

@rjha-splunk
Copy link
Collaborator

@mstopa-splunk @rjha-splunk Are we have a plan to create ansible playbook that will bootstrap sc4s instances with LB? I understanding that some of the settings are optional, but are we have such plans?

@ikheifets-splunk not yet


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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scale vertically by fine-tuning a single, robust server. Tools and methods for enhancing performance on your SC4S server are documented in:

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid co-locating syslog-ng servers for horizontal scaling with load balancers. Load balancing challenges for horizontal scaling are described in the Load Balancer's Overview section.


## High Availability (HA) Considerations

Syslog, being prone to data loss, can only achieve "mostly available" data collection.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syslog is prone to data loss and can only achieve "mostly available" data collection.


### 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Load balancing does not work well with syslog’s stateless, unacknowledged traffic. To preserve more data by using simpler designs, such as vMotioned VMs.


Consider applying these changes to your infrastructure. After each adjustment, run the [performance tests](performance-tests.md#check-your-udp-performance) and retain the changes that result in improvements.

## Tune Your Receive Buffer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tune your receiving buffer

sudo sysctl -p
```

2. Update `/opt/sc4s/env_file`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Update /opt/sc4s/env_file:

SC4S_SOURCE_UDP_SO_RCVBUFF=536870912
```

3. Restart SC4S
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Restart SC4S:


3. Restart SC4S

## Tune UDP Fetch Limit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tune UDP fetch limit

SC4S_SOURCE_UDP_FETCH_LIMIT=1000000
```

## Increase the Number of UDP Sockets
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increase the number of UDP sockets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants