Author: Aivars Kalvāns


FastAPI and cooperative multi-threading

This post was first published in Cal Paterson wrote a great article comparing and describing synchronous and asynchronous Python frameworks and explaining why asynchronous frameworks go a bit wobbly under load. This is a story of how we experienced wobbliness in a recent project. We are using FastAPI, Pydantic, and...

February 10, 2022

Optimizing Kafka producers for latency

This post was first published in The code I am working with uses Confluent Kafka Python library that calls librdkafka C++ library underneath. The code does synchronous messaging: it produces events one-by-one and ensures event is persisted in Kafka topic by waiting for acknowledgments from all replicas. This code is sensitive to latency...

January 28, 2022