Apache Kafka Tutorial: Use Cases and Challenges of Logging at Scale

4 MIN READ
MIN READ

Enterprises often have several servers, firewalls, databases, mobile devices, API endpoints, and other infrastructure that powers their IT. Because of this, organizations must provide resources to manage logged events across the environment. Logging is a factor in detecting and blocking cyber-attacks, and organizations use log data for auditing during an investigation after an incident. Brokers, such as Apache Kafka, will ingest logging data in real-time, process, store, and route data. Kafka acts as a broker between infrastructure and the tools used to analyze and audit the network. Even with its advantages, Kafka has its challenges with scaling.


What Are Some Kafka Use Cases?

We can use brokers in small or large organizations. However, we often integrate systems such as Kafka when logs become fragmented as we add more infrastructure to the environment and more logs accumulate. Instead of storing individual logs from various sources, Apache Kafka retrieves them from multiple systems and stores them in one location. 

Organizations that integrate Kafka need a reliable tool to pull data from each log file and process it for review. It’s also helpful when an organization needs a way to process data in real time and detect anomalies quickly. Kafka is open source, so it’s a value-added Apache system that can turn disorganized logging streams into understandable output that can be used to monitor an environment better and detect an ongoing event that should receive immediate attention. Streaming logs can make IT staff better aware of issues to be proactive with events that could result in downtime.

How Does Kafka Work?

Implementing Kafka requires the proper infrastructure. The system basics involve servers and clients to publish (write) and subscribe to (read) logs. Clients and servers communicate over the TCP network protocol, so adding the Kafka environment to your current environment only requires the right cluster and storage infrastructure. Kafka can span multiple servers in a cluster for performance. For redundancy and uptime, usually, it’s provisioned across data centers. A cluster of servers also helps with reliability, as any server can take over when one fails.

Servers are the main components that let you import and export data as a service broker that will process data in real time, but clients are the component that makes it possible. A client is the streaming service running on Kafka servers for log processing. Several client services are available since Kafka is an open source technology, including those written in Go, Python, C,  and C++, enabling administrators to choose the client that works best for their environment and the server operating system.

In the logging world, every item in a log is called an event. In the Kafka environment, you have producers and consumers. A producer is a component in your infrastructure that creates logged events. The events within these logs depend on the infrastructure. For example, a database would have several logged events that define authentication, authorization, and SQL statements executed on the server. Administrators can determine if events logged by the database are successful or failed events. Logs can accumulate gigabytes (or even terabytes) of data within a day, so administrators choose the events that logs will store.

Consumers subscribe to and read log events. Neither consumers nor clients rely on the other to function. For example, if you have a Kafka server fail or taken out of service for maintenance, producers will still create events without failing due to a server going offline.

Consumers can subscribe and pull data in a first-come-first-serve order from log partitions. Partitions are “buckets” of stored log data available for consumption and streamed for further analysis. Partitions bring together the writing and reading of events, but it’s also the main issue with scalability.

What Are The Challenges With Using Kafka?

The biggest challenge for any organization using Kafka is scalability. Decoupled publishers and subscribers have their benefits, but it also causes complexity as the business grows and adds more to infrastructure. The most significant resources necessary for Kafka performance are server memory (RAM), disk capacity, and network bandwidth. As servers process more log events, send more data across the network, and more logs accrue on the cluster, administrators must provide additional resources on servers. Because of the excessive resource requirements, the costs to support Kafka don’t scale well.

Partitions hold messages where consumers pick up the next event in line. Kafka will only cache and store messages for a specific amount of time, and then they are deleted. If a consumer does not retrieve the next event in time, a growing organization without scaled resources could experience deleted important events. 

Administrators responsible for Kafka performance need to update and maintain servers continually. As events increase, partitions and consumer resources also must increase. A spike in logged events could cause a bottleneck in the Kafka system, where events are deleted and lost without administrator knowledge. Should a significant event happen, such as a cybersecurity event, administrators might be unaware of a compromise and data breach.

How Can Logging Bottlenecks be Avoided?

Although Kafka can be sufficient in smaller environments, large enterprises need a more robust and scalable solution to handle increases in events. We engineered Mezmo, formerly LogDNA, to handle millions of log lines per second and over 20 terabytes of data a day. We originally tested our solution with Elasticsearch and the many variables that go with enterprise logging and events. The logging solutions from Mezmo can seamlessly pick up where Kafka scaling drops off.

Table of Contents

    Share Article

    RSS Feed

    Next blog post
    You're viewing our latest blog post.
    Previous blog post
    You're viewing our oldest blog post.
    Mezmo’s AI-powered Site Reliability Engineering (SRE) agent for Root Cause Analysis (RCA)
    What is Active Telemetry
    Launching an agentic SRE for root cause analysis
    Paving the way for a new era: Mezmo's Active Telemetry
    The Answer to SRE Agent Failures: Context Engineering
    Empowering an MCP server with a telemetry pipeline
    The Debugging Bottleneck: A Manual Log-Sifting Expedition
    The Smartest Member of Your Developer Ecosystem: Introducing the Mezmo MCP Server
    Your New AI Assistant for a Smarter Workflow
    The Observability Problem Isn't Data Volume Anymore—It's Context
    Beyond the Pipeline: Data Isn't Oil, It's Power.
    The Platform Engineer's Playbook: Mastering OpenTelemetry & Compliance with Mezmo and Dynatrace
    From Alert to Answer in Seconds: Accelerating Incident Response in Dynatrace
    Taming Your Dynatrace Bill: How to Cut Observability Costs, Not Visibility
    Architecting for Value: A Playbook for Sustainable Observability
    How to Cut Observability Costs with Synthetic Monitoring and Responsive Pipelines
    Unlock Deeper Insights: Introducing GitLab Event Integration with Mezmo
    Introducing the New Mezmo Product Homepage
    The Inconvenient Truth About AI Ethics in Observability
    Observability's Moneyball Moment: How AI Is Changing the Game (Not Ending It)
    Do you Grok It?
    Top Five Reasons Telemetry Pipelines Should Be on Every Engineer’s Radar
    Is It a Cup or a Pot? Helping You Pinpoint the Problem—and Sleep Through the Night
    Smarter Telemetry Pipelines: The Key to Cutting Datadog Costs and Observability Chaos
    Why Datadog Falls Short for Log Management and What to Do Instead
    Telemetry for Modern Apps: Reducing MTTR with Smarter Signals
    Transforming Observability: Simpler, Smarter, and More Affordable Data Control
    Datadog: The Good, The Bad, The Costly
    Mezmo Recognized with 25 G2 Awards for Spring 2025
    Reducing Telemetry Toil with Rapid Pipelining
    Cut Costs, Not Insights:   A Practical Guide to Telemetry Data Optimization
    Webinar Recap: Telemetry Pipeline 101
    Petabyte Scale, Gigabyte Costs: Mezmo’s Evolution from ElasticSearch to Quickwit
    2024 Recap - Highlights of Mezmo’s product enhancements
    My Favorite Observability and DevOps Articles of 2024
    AWS re:Invent ‘24: Generative AI Observability, Platform Engineering, and 99.9995% Availability
    From Gartner IOCS 2024 Conference: AI, Observability Data, and Telemetry Pipelines
    Our team’s learnings from Kubecon: Use Exemplars, Configuring OTel, and OTTL cookbook
    How Mezmo Uses a Telemetry Pipeline to Handle Metrics, Part II
    Webinar Recap: 2024 DORA Report: Accelerate State of DevOps
    Kubecon ‘24 recap: Patent Trolls, OTel Lessons at Scale, and Principle Platform Abstractions
    Announcing Mezmo Flow: Build a Telemetry Pipeline in 15 minutes
    Key Takeaways from the 2024 DORA Report
    Webinar Recap | Telemetry Data Management: Tales from the Trenches
    What are SLOs/SLIs/SLAs?
    Webinar Recap | Next Gen Log Management: Maximize Log Value with Telemetry Pipelines
    Creating In-Stream Alerts for Telemetry Data
    Creating Re-Usable Components for Telemetry Pipelines
    Optimizing Data for Service Management Objective Monitoring
    More Value From Your Logs: Next Generation Log Management from Mezmo
    A Day in the Life of a Mezmo SRE
    Webinar Recap: Applying a Data Engineering Approach to Telemetry Data
    Dogfooding at Mezmo: How we used telemetry pipeline to reduce data volume
    Unlocking Business Insights with Telemetry Pipelines
    Why Your Telemetry (Observability) Pipelines Need to be Responsive
    How Data Profiling Can Reduce Burnout
    Data Optimization Technique: Route Data to Specialized Processing Chains
    Data Privacy Takeaways from Gartner Security & Risk Summit
    Mastering Telemetry Pipelines: Driving Compliance and Data Optimization
    A Recap of Gartner Security and Risk Summit: GenAI, Augmented Cybersecurity, Burnout
    Why Telemetry Pipelines Should Be A Part Of Your Compliance Strategy
    Pipeline Module: Event to Metric
    Telemetry Data Compliance Module
    OpenTelemetry: The Key To Unified Telemetry Data
    Data optimization technique: convert events to metrics
    What’s New With Mezmo: In-stream Alerting
    How Mezmo Used Telemetry Pipeline to Handle Metrics
    Webinar Recap: Mastering Telemetry Pipelines - A DevOps Lifecycle Approach to Data Management
    Open-source Telemetry Pipelines: An Overview
    SRECon Recap: Product Reliability, Burn Out, and more
    Webinar Recap: How to Manage Telemetry Data with Confidence
    Webinar Recap: Myths and Realities in Telemetry Data Handling
    Using Vector to Build a Telemetry Pipeline Solution
    Managing Telemetry Data Overflow in Kubernetes with Resource Quotas and Limits
    How To Optimize Telemetry Pipelines For Better Observability and Security
    Gartner IOCS Conference Recap: Monitoring and Observing Environments with Telemetry Pipelines
    AWS re:Invent 2023 highlights: Observability at Stripe, Capital One, and McDonald’s
    Webinar Recap: Best Practices for Observability Pipelines
    Introducing Responsive Pipelines from Mezmo
    My First KubeCon - Tales of the K8’s community, DE&I, sustainability, and OTel
    Modernize Telemetry Pipeline Management with Mezmo Pipeline as Code
    How To Profile and Optimize Telemetry Data: A Deep Dive
    Kubernetes Telemetry Data Optimization in Five Steps with Mezmo
    Introducing Mezmo Edge: A Secure Approach To Telemetry Data
    Understand Kubernetes Telemetry Data Immediately With Mezmo’s Welcome Pipeline
    Unearthing Gold: Deriving Metrics from Logs with Mezmo Telemetry Pipeline
    Webinar Recap: The Single Pane of Glass Myth
    Empower Observability Engineers: Enhance Engineering With Mezmo
    Webinar Recap: How to Get More Out of Your Log Data
    Unraveling the Log Data Explosion: New Market Research Shows Trends and Challenges
    Webinar Recap: Unlocking the Full Value of Telemetry Data
    Data-Driven Decision Making: Leveraging Metrics and Logs-to-Metrics Processors
    How To Configure The Mezmo Telemetry Pipeline
    Supercharge Elasticsearch Observability With Telemetry Pipelines
    Enhancing Grafana Observability With Telemetry Pipelines
    Optimizing Your Splunk Experience with Telemetry Pipelines
    Webinar Recap: Unlocking Business Performance with Telemetry Data
    Enhancing Datadog Observability with Telemetry Pipelines
    Transforming Your Data With Telemetry Pipelines
    6 Steps to Implementing a Telemetry Pipeline