• Products
    LOG COLLECTOR
    NXLog Enterprise Edition
    Full feature multi-platform log collection
    NXLog Community Edition
    Open-source free log collector
    ADD-ONS FOR NXLOG ENTERPRISE EDITION
    NXLog Add-Ons
    Integration with various software
    AGENT MANAGER FOR NXLOG ENTERPRISE EDITION
    NXLog Manager
    Manage and monitor NXLog instances
    NXLog Minder
    Hyper-scalable, API-first agent management
    DATABASE FOR NXLOG ENTERPRISE EDITION
    Raijin Database Engine
    The schemaless SQL database for storing events
    more from nxlog
    Professional Services
    Compare NXLog EE and CE
  • Downloads
    NXLog Enterprise Edition
    Full feature multi-platform log collection
    NXLog Manager
    Manage and monitor NXLog instances
    NXLog Community Edition
    Open-source free log collector
  • Solutions
    Integrations
    With SIEM, Devices, SaaS...
    Specfic OS support
    AIX, Linux, FreeBSD
    SCADA/ICS
    Energy, Oil & Gas, Transport...
    Windows Event log
    Collect locally or remotely, ..
    DNS Logging
    Enterprise-grade DNS log...
    Log Collection Modes
    Agent-based, Agentless or Cloud
    Agent Management
    Agents management and monitoring
    FIM
    File Integrity Monitoring
    macOS Logging
    ULS events, Apple System Logs ...

    By Industry

    Financial Services
    Government & Education
    Entertainment & Gambling
    Telecommunications
    Medical & Healthcare
    Military & Defense
    Law Firms & Legal Counsel
    Industrial & Manufacturing
  • Partners
    Find a Reseller
    Look for our resellers worldwide
    Technology Ecosystem
    See all our partners and integrations
    Partner Program
    Join our community of partners
    Partner Portal →
  • Resources
    Documentation
    Products guides and integrations
    Blog
    Tutorials, updates and releases
    White papers
    Datasheets, infographics and more
    Videos
    Trainings and tutorial on specific topics
    Webinars
    Community events and webinars
    Community Forum →
  • Support
  • Why Nxlog
    About Us
    Our journey, team and mission
    Customers
    Testimonials and case studies
    Careers
    We are hiring!
    Contact Us →
Log In Sign Up
Request Trial
LOG COLLECTOR
NXLog Enterprise Edition
Full feature multi-platform log collection
NXLog Community Edition
Open-source free log collector
ADD-ONS FOR NXLOG ENTERPRISE EDITION
NXLog Add-Ons
Integration with various software
AGENT MANAGER FOR NXLOG ENTERPRISE EDITION
NXLog Manager
Manage and monitor NXLog instances
NXLog Minder
Hyper-scalable, API-first agent management
DATABASE FOR NXLOG ENTERPRISE EDITION
Raijin Database Engine
The schemaless SQL database for storing events
more from nxlog
Professional Services
Compare NXLog EE and CE
NXLog Enterprise Edition
Full feature multi-platform log collection
NXLog Manager
Manage and monitor NXLog instances
NXLog Community Edition
Open-source free log collector
Integrations
With SIEM, Devices, SaaS...
Specfic OS support
AIX, Linux, FreeBSD
SCADA/ICS
Energy, Oil & Gas, Transport...
Windows Event log
Collect locally or remotely, ..
DNS Logging
Enterprise-grade DNS log...
Log Collection Modes
Agent-based, Agentless or Cloud
Agent Management
Agents management and monitoring
FIM
File Integrity Monitoring
macOS Logging
ULS events, Apple System Logs ...

By Industry

Financial Services
Government & Education
Entertainment & Gambling
Telecommunications
Medical & Healthcare
Military & Defense
Law Firms & Legal Counsel
Industrial & Manufacturing
Find a Reseller
Look for our resellers worldwide
Technology Ecosystem
See all our partners and integrations
Partner Program
Join our community of partners
Partner Portal →
Documentation
Products guides and integrations
Blog
Tutorials, updates and releases
White papers
Datasheets, infographics and more
Videos
Trainings and tutorial on specific topics
Webinars
Community events and webinars
Community Forum →
Support
About Us
Our journey, team and mission
Customers
Testimonials and case studies
Careers
We are hiring!
Contact Us →
  • Loading...
Request Trial
February 2, 2022 strategy

Reliable delivery of logs - can you trust TCP?

By Collins Maina

Share
ALL SIEM STRATEGY SECURITY ANNOUNCEMENT DEPLOYMENT COMPLIANCE COMPARISON RSS

When considering your log collection strategy, a decision you have to make is which transport protocol to use to transfer logs from source to destination. The choice is often between the two most commonly used protocols, UDP (User Datagram Protocol) and TCP (Transfer Control Protocol). Which one to use depends on the type of logs you need to transfer, and whether performance or reliability is more important.

This blog post will compare these protocols, discuss why TCP is usually the preferred choice, and provide some options to further increase log delivery reliability with NXLog Enterprise Edition.

Protocol differences - TCP vs. UDP

The main difference between these protocols lies in how data packets move from one point to another. UDP is a connection-less protocol that does not guarantee the delivery of data packets to the destination; therefore, it is considered unreliable. On the other hand, TCP is a connection-oriented protocol designed to ensure the delivery of data packets to the destination, and so it is considered a reliable protocol.

Although UDP is an unreliable protocol, it has its uses when performance is preferred over reliability. UDP reduces the overhead of establishing a network session and can attain faster transmission speeds. Since it does not require receipt verification, it also reduces network load. These factors make it suitable for transferring high-volume, non-critical logs. UDP is usually preferred in monitoring applications to minimize overhead on the system you’re monitoring, or when having the latest logging data is of greater importance than having complete data.

When reliable data transfer is important, TCP is the natural choice since it ensures the delivery of packets to their destination. It is not the intent of this blog post to go into the technical details of how TCP works. However, in a nutshell, it achieves this reliability by performing what is known as a three-way handshake, where the client and server exchange a series of SYN (synchronize) and ACK (acknowledge) packets to initiate communication and establish a reliable connection for the actual data transfer to start. After sending data, the client waits a specific length of time for an acknowledgment. If it does not receive an acknowledgment from the server during that period, it will assume the packet was lost and retransmit it. When considering which protocol to use for log forwarding, TCP reliability is an important benefit to have.

Unreliable aspects of TCP

The original intent of the TCP protocol was to ensure that a connection is established and data is transferred reliably. However, you should be aware of some adverse effects when transferring log data over TCP.

The reliability-first approach of the TCP protocol creates some overhead on the system since it needs to create a connection and maintain its state, deliver packets in the correct order, ensure data integrity, and resend packages if required. Even so, it is still possible to lose data if the server prematurely closes the connection while it is transmitting data. In such cases, unsent data stored in the socket buffers will be lost.

Additionally, even though TCP can detect duplicate packets, there are instances where data duplication is possible. For example, this can happen if the ACK packets are lost and data is retransmitted. In other words, although TCP is designed to guarantee that each packet arrives only once, if the connection breaks, there is no way of knowing what exactly arrived.

In most cases, TCP is suitable for transferring logs because its benefits outweigh the disadvantages. Although TCP cannot guarantee that data loss or duplication will never happen, there are other ways to make your log transfer more reliable, and NXLog can help with this.

Improving log delivery reliability with NXLog

With NXLog, whether you choose to transfer your logs via TCP, UDP, or another protocol altogether, you gain access to functionality that helps you mitigate data loss or log duplication, which includes:

  • Methods to create buffers that allow syncing logs before forwarding them to their destination. The pm_buffer module offers both memory and disk-based buffering. They can even be combined to significantly reduce the risk of data loss due to a system crash or network failure.

  • Log duplication prevention is provided by the duplicate_guard() function. See Protection against duplication in the NXLog User Guide.

  • Addressing unreliability in the TCP protocol by using application-level acknowledgment. Two sets of modules are available for this purpose:

    • The om_http / im_http modules guarantee message delivery over the network by sending logs (om_http) in an HTTP POST request. The server (im_http or a third-party HTTP server) responds with a status code to indicate if the data was received and processed successfully.

    • The om_batchcompress / im_batchcompress modules also acknowledge receipt of data with the added benefit of data compression for faster transfer. In addition, these modules serialize fields so that structured data is preserved for later processing at the destination.

    You can configure both options to transfer data securely using TLS/SSL.

Addressing log delivery reliability is required for compliance standards and certifications such as PCI-DSS, SOX, HIPAA, and ISO27001. With these features, you can tailor your log collection solution to ensure the timely delivery of logs while reducing the risk of data loss during transit. Whatever your requirements, NXLog can help you achieve the right balance between efficiency and reliability that best suits your needs. If you are interested in learning more about implementing these solutions, see Reliable message delivery in the NXLog User Guide.

GET STARTED TODAY:
CONTACT US Our experts are happy to help REQUEST A FREE TRIAL Give NXLog Enterprise Edition a try GET PRICING Request a quote

NXLog Ltd. develops multi-platform log collection tools that support many different log sources, formats, transports, and integrations. The tools help administrators collect, parse, and forward logs so they can more easily respond to security issues, investigate operational problems, and analyze event data. NXLog distributes the free and open source NXLog Community Edition and offers additional features and support with the NXLog Enterprise Edition.

This document is provided for informational purposes only and is subject to change without notice. Trademarks are the properties of their respective owners.

  • reliability
  • tcp
  • udp
Share

Facebook Twitter LinkedIn Reddit Mail
Related Posts

Using Raijin Database Engine to aggregate and analyze Windows security events
11 minutes | July 29, 2021
File-based logs? Yes, they’re still being used!
3 minutes | August 25, 2021
Reduce log size and cut costs with NXLog
4 minutes | June 11, 2021

Stay connected:

Sign up

Keep up to date with our weekly digest of articles.

By clicking singing up, I agree to the use of my personal data in accordance with NXLog Privacy Policy.

Featured posts

Announcing NXLog Enterprise Edition 5.7
January 20, 2023
NXLog - 2022 in review
December 22, 2022
Need to replace syslog-ng? Changing to NXLog is easier than you think
November 23, 2022
The EU's response to cyberwarfare
November 22, 2022
Looking beyond Cybersecurity Awareness Month
November 8, 2022
GDPR compliance and log data
September 23, 2022
NXLog in an industrial control security context
August 10, 2022
Raijin vs Elasticsearch
August 9, 2022
NXLog provides native support for Google Chronicle
May 11, 2022
Aggregating macOS logs for SIEM systems
February 17, 2022
How a centralized log collection tool can help your SIEM solutions
April 1, 2020

Categories

  • SIEM
  • STRATEGY
  • SECURITY
  • ANNOUNCEMENT
  • DEPLOYMENT
  • COMPLIANCE
  • COMPARISON

Subscribe to our newsletter to get the latest updates, news, and products releases.

© Copyright 2023 NXLog Ltd.

PRIVACY POLICY TERMS OF USE

  • PRODUCTS

  • NXLOG ENTERPRISE EDITION
  • NXLOG COMMUNITY EDITION
  • NXLOG ADD-ONS
  • NXLOG MANAGER
  • NXLOG MINDER
  • RAIJIN DATABASE
  • MORE NXLOG

  • COMPARE SOLUTIONS
  • INDUSTRIES
  • INTERGRATIONS
  • FIND A RESELLER
  • PARTNER PROGRAM
  • RESOURCES

  • DOCUMENTATION
  • WHITE PAPERS
  • WEBINARS
  • TUTORIALS
  • BLOG
  • COMMUNITY FORUM
  • ABOUT US

  • WHY NXLOG
  • CUSTOMERS
  • CAREERS
  • CONTACT US
  • DOWNLOADS

  • NXLOG ENTERPRISE EDITION
  • NXLOG COMMUNITY EDITION
  • NXLOG MINDER
  • NXLOG MANAGER
  • NXLOG ADD-ONS
  • RAIJIN DATABASE