Session

Building High-Throughput Event Pipelines with Python and NATS

Building High-Throughput Event Pipelines with Python and NATS

Duration: 25 minutes

Prerequisites: Basic Python knowledge, familiarity with APIs and distributed systems concepts. No prior experience with NATS required.

Talk Overview

Modern applications are no longer built as isolated services. They communicate through streams of events, real-time updates, and asynchronous workflows that demand reliability, scalability, and low latency. While traditional message brokers often introduce operational complexity, NATS offers a lightweight, high-performance approach to event-driven architecture.

In this talk, we'll explore how to build high-throughput event pipelines using Python and NATS. Starting with the challenges of synchronous communication, we'll examine why event-driven systems have become the backbone of modern distributed architectures. Through practical examples, attendees will learn how producers, consumers, subjects, queues, and streams work together to process large volumes of events efficiently.

We'll build a complete event pipeline in Python, explore JetStream for durability and replayability, implement consumer scaling patterns, and discuss strategies for handling failures, backpressure, and observability in production systems.

By the end of the session, attendees will understand how to design, build, and operate event-driven applications capable of processing thousands of messages per second with minimal complexity.

Detailed Outline

1. Why Event-Driven Architecture? (3 minutes)

* Challenges of synchronous service-to-service communication
* Tight coupling and scalability limitations
* Introduction to event-driven systems
* Common use cases:

* Real-time notifications
* Analytics pipelines
* Microservices communication
* Background processing

Key takeaway: Events enable scalable, loosely coupled architectures.

2. Understanding NATS Fundamentals (4 minutes)

* What is NATS?
* Core architecture and design philosophy
* Subjects and publish-subscribe messaging
* Request-reply patterns
* Queue groups for workload distribution

Live demonstration:

* Publishing and consuming messages using Python

Key takeaway: NATS provides simple primitives that enable powerful messaging patterns.

3. Building an Event Pipeline in Python (6 minutes)

* Setting up NATS clients using Python
* Creating producers and consumers
* Designing event contracts
* Event serialization strategies
* Handling concurrent consumers

Live coding:

* Building a simple order-processing pipeline
* Publishing events from one service and consuming them in another

Key takeaway: Event-driven workflows can be implemented with minimal code and infrastructure.

4. Scaling with JetStream (5 minutes)

* Why durability matters
* Streams and consumers
* Message persistence
* Acknowledgements
* Replay and recovery mechanisms

Demonstration:

* Recovering from consumer failures
* Replaying historical events

Key takeaway: JetStream extends NATS from lightweight messaging to resilient event streaming.

5. Production Considerations (4 minutes)

* Backpressure management
* Consumer scaling patterns
* Idempotency and duplicate handling
* Monitoring and observability
* Performance tuning techniques

Real-world lessons learned from operating event-driven systems.

Key takeaway: Reliability comes from architecture and operational discipline, not just technology.

6. Closing Thoughts & Q&A (3 minutes)

* When to choose NATS
* Comparing NATS with Kafka and RabbitMQ
* Common architectural patterns
* Future of event-driven systems

Learning Outcomes

By the end of this talk, attendees will:

* Understand the principles of event-driven architecture.
* Learn the core concepts of NATS and JetStream.
* Build event producers and consumers using Python.
* Design scalable and resilient event pipelines.
* Handle failures, retries, and message durability effectively.
* Understand how high-throughput messaging systems operate in production environments.
* Gain practical knowledge that can be applied immediately in microservices and distributed systems.

Muhammed Mizaj

Product Engineer at UST Global

Thiruvananthapuram, India

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top