Data, Distributed Systems & Security Quick Reference

One page of settings, numbers, comparisons and decision guides: Kafka production defaults, delivery semantics, pattern selection, consistency, table formats, data protection techniques, STRIDE, OWASP lists and regulatory clocks.

On this page

Kafka production defaults#

Setting Value
replication.factor 3 (across 3 AZs, rack-aware)
min.insync.replicas 2
acks all
enable.idempotence true
unclean.leader.election.enable false
compression.type zstd or lz4
linger.ms / batch.size 5–20 ms / 64–256 KB
enable.auto.commit (business consumers) false; commit after processing
group.protocol consumer (KIP-848)
isolation.level (downstream of transactions) read_committed
Controllers 3 dedicated KRaft controllers

Delivery semantics#

Need Use
Loss acceptable At-most-once
Business events At-least-once + idempotent consumer
Kafka → process → Kafka Exactly-once (transactions / exactly_once_v2)
DB state + event Transactional outbox + CDC
API retries Idempotency-Key

Which pattern?#

Problem Pattern
State change must emit an event reliably Outbox + CDC
Duplicates Idempotent consumer / inbox
Multi-service business transaction Saga (orchestrated for long flows)
Reserve then commit TCC / authorise–capture
Different read and write shapes CQRS
Full history and audit Event sourcing
Queue of independent jobs Kafka share group
Ordered stream per entity Consumer group, keyed by entity
Real-time aggregates and alerts Flink / Kafka Streams with event time

Consistency cheat sheet#

Term One-liner
Linearizable Behaves like one copy, in real-time order
Causal Causes are seen before effects
Read-your-writes You see your own updates
Eventual Replicas converge when writes stop
CAP Under a partition: C or A
PACELC Else: latency or consistency
Quorum R + W > N
Raft Majority commit; 3 or 5 nodes

Table formats and catalogs#

Iceberg Delta Hudi
Strength Engine-neutral, REST catalog Spark/Databricks Upserts, incremental
Catalogs Polaris, Unity, Glue/S3 Tables, Nessie Unity Hive/Glue

Iceberg v3: deletion vectors · row lineage · VARIANT · geo types · ns timestamps · defaults.

Data protection techniques#

Technique Reversible Typical use
Encryption (AES-GCM) Yes (key) At rest, in transit, fields
Tokenisation Via vault only PAN, IDs, PCI scope reduction
FPE Yes Legacy format constraints
Static masking No Test data
Dynamic masking View only Analysts
Keyed hashing No Joins without revealing values
Crypto-shredding Deletes access Erasure from immutable stores

STRIDE → controls#

Threat Control
Spoofing MFA / passkeys, mTLS, workload identity
Tampering TLS, signatures, MACs, validation, immutable logs
Repudiation Signed audit logs, SCA evidence
Information disclosure Authorisation per object, encryption, masking
Denial of service Rate limits, quotas, autoscaling, WAF
Elevation of privilege Least privilege, ABAC, sandboxing

OWASP lists#

OWASP Top 10:2025 LLM Top 10 2025 Agentic Top 10 2026
A01 Broken Access Control LLM01 Prompt Injection ASI01 Agent Goal Hijack
A02 Security Misconfiguration LLM02 Sensitive Info Disclosure ASI02 Tool Misuse
A03 Software Supply Chain Failures LLM03 Supply Chain ASI03 Identity & Privilege Abuse
A04 Cryptographic Failures LLM04 Data & Model Poisoning ASI04 Agentic Supply Chain
A05 Injection LLM05 Improper Output Handling ASI05 Unexpected Code Execution
A06 Insecure Design LLM06 Excessive Agency ASI06 Memory & Context Poisoning
A07 Authentication Failures LLM07 System Prompt Leakage ASI07 Insecure Inter-Agent Comms
A08 Software/Data Integrity Failures LLM08 Vector & Embedding Weaknesses ASI08 Cascading Failures
A09 Logging & Alerting Failures LLM09 Misinformation ASI09 Human–Agent Trust Exploitation
A10 Mishandling of Exceptional Conditions LLM10 Unbounded Consumption ASI10 Rogue Agents

Regulatory clocks and dates#

Rule Clock / date
DORA major incident Initial within 4 h of classification (max 24 h from awareness) · intermediate within 72 h · final within 1 month
NIS2 Early warning within 24 h · notification within 72 h
GDPR breach Within 72 h to the supervisory authority
RBI cyber incident Within 6 h
CERT-In Within 6 h; logs kept 180 days in India
SEC (US) material incident Within 4 business days
PCI DSS v4 future-dated requirements Mandatory since 31 Mar 2025
EU AI Act transparency (Art. 50) 2 Aug 2026
EU AI Act high-risk (Annex III, e.g. credit scoring) 2 Dec 2027
EU CRA reporting / full application Sep 2026 / Dec 2027
DPDP Rules: Consent Managers / most obligations Nov 2026 / May 2027
PSD3/PSR application Expected 2027–28

Decision guide: sync or async?#

Synchronous or event-driven?
flowchart TB
    Q1{"Does the caller need<br/>the answer now?"} -->|"yes"| SYNC["Synchronous call<br/>(keep the chain short)"]
    Q1 -->|"no"| Q2{"Do several consumers care,<br/>or must it survive outages?"}
    Q2 -->|"yes"| EVT["Publish an event<br/>(outbox)"]
    Q2 -->|"no, one receiver"| CMD["Async command<br/>or queue (share group)"]