Kubai Kevin

19 articles tagged Python

FastAPI vs Django vs Flask: API picks for 2026

Compare FastAPI, Django, and Flask on concurrency, validation, ORM, auth, and operations, with a worked latency example and a 30-minute check.

15 min read · 9 November 2026

SQLAlchemy vs asyncpg: pooling in async services

How SQLAlchemy's async engine and asyncpg's pool actually relate, how to size pools against Postgres max_connections, and the failure modes that cause timeouts.

13 min read · 3 November 2026

Dead-letter queues: stop poison messages

Design retry caps, DLQs, and alerts so a poison message is isolated in seconds. Includes working Redis Queue code and pytest tests.

15 min read · 21 September 2026

Rust SDK vs FastAPI for LLM ops: trust in 2026

How to compare a compiled Rust inference service against a Python async API for LLM serving: cold starts, cache stampedes, memory, and how to measure each.

10 min read · 14 August 2026

Orchestration tax kills multi-agent systems

Why coordination layers dominate multi-agent latency and memory, with patterns that remove the scheduler and how to measure your own orchestration tax.

13 min read · 11 August 2026

Agent followed instructions too literally: the cron job trap

Why agents that follow retry instructions literally hang forever, and how to fix it with per-request timeouts, async retries, and DNS limits.

12 min read · 11 August 2026

Cost-Effective AI Infrastructure for Micro-SaaS

How to architect an AI micro-SaaS on a tight budget: caching, batching, serverless scaling, cost measurement, and the failure modes that break naive designs.

15 min read · 5 August 2026

MCP servers: the 3 hidden costs nobody quotes

MCP servers are stateful async processes, not stateless APIs. Here are the real cost drivers, failure modes, and how to measure them yourself.

16 min read · 5 August 2026

CDC pipeline death spiral: one bad LLM call can crash…

How unconstrained LLM bursts stall CDC pipelines, and how to add backpressure at each layer with metrics, configs, and a worked failure example.

12 min read · 2 August 2026

Built a multi-agent system without LangGraph

Build a multi-agent research pipeline with Redis Streams, Step Functions retries and FastAPI, plus the failure modes that matter and how to measure them.

13 min read · 27 July 2026

Build agent workflows that survive restarts

How to build agent task pipelines that resume after crashes, schema drift and model changes, using Redis streams, idempotent steps and replay.

12 min read · 6 July 2026

AI Code Generation: Failure Modes and Guardrails

AI code assistants change interfaces, concurrency and state in ways that pass review. Here are the failure modes and the checks that catch them.

11 min read · 3 July 2026

Keeping AI-Generated Code from Rotting Your Repository

How to detect and contain AI-generated code debt with linters, review gates, and measurement instead of expensive governance platforms.

12 min read · 3 July 2026

Tame Python async’s hidden traps

Compare threaded and task-based async in Python: how each works, where each fails, how to measure the tradeoff yourself, and a checklist for choosing.

11 min read · 29 June 2026

Price AI-proof skills in 2026

How to build an auditable compensation evidence pack that separates human-only work from AI-assisted output, with reproducible tooling and a negotiation script.

14 min read · 29 June 2026

Negotiate salaries with AI skills in 2026

A practical method for quantifying which parts of a job AI can automate, building a defensible salary anchor, and handling pushback in negotiation.

11 min read · 27 June 2026

Unlock Python 3.13's free-threaded GIL for web apps

Free-threaded Python removes the GIL, but C extensions, shared state and pools break. A practical checklist for migrating a web service safely.

14 min read · 22 June 2026

AI glue code: 3 ways to avoid duct-taping models

Low-code AI platforms hide prompt drift, adapter decay and cold starts. Detect each with logged queries, a golden set and pre-warming, wired into CI.

14 min read · 20 June 2026

Price your remote job like a New York dev

A worked method for turning a target take-home figure into a defensible hourly rate for US clients, including FX handling, tax and VAT lines, and quote logging.

13 min read · 8 June 2026