Centralized Logging Architecture — Designing Log Infrastructure for Scale
DodaTech
Updated 2026-06-28
1 min read
In this tutorial, you'll learn about Centralized Logging Architecture. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.
Centralized logging infrastructure must handle high throughput, provide durable storage, and enable fast query performance.
# Log pipeline architecture
# Service -> Filebeat -> Kafka -> Logstash -> Elasticsearch -> Kibana
# \-> S3 (cold storage) -> Athena (SQL queries)
# Kafka log topic configuration
log_topic:
name: logs-scanapp
partitions: 12
replication_factor: 3
retention_ms: 604800000 # 7 days
config:
cleanup.policy: delete
compression.type: snappy
# Logstash pipeline with buffering
input {
kafka {
topics: ["logs-scanapp"]
consumer_threads: 4
max_poll_records: 500
fetch_max_wait_ms: 500
}
}
filter {
if "_jsonparsefailure" in [tags] {
drop {}
}
date {
match => ["timestamp", "ISO8601"]
target => "@timestamp"
}
}
output {
elasticsearch {
hosts => ["${ELASTIC_HOSTS}"]
index => "logs-scanapp-%{+YYYY.MM.dd}"
ilm_enabled: true
ilm_policy: "90-days-retention"
}
s3 {
bucket => "scanapp-logs-archive"
prefix => "logs/%{+YYYY/MM/dd}"
rotation_strategy => "size"
rotation_size => "5 GB"
}
}
Well-designed log infrastructure handles peak traffic volumes while maintaining query performance and cost efficiency.
← Previous
Log Sampling — Smart Log Sampling for High-Volume Systems
Next →
Log Redaction — Securing Sensitive Data in Logs
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro