---
title: "Discussion on \"Async AI Pipelines in FastAPI: Streaming, Queuing, and Long-Running Requests\" | Hashnode"
description: "Discussion on \"Async AI Pipelines in FastAPI: Streaming, Queuing, and Long-Running Requests\". Three patterns for LLM calls that don't block Cloud Run — SSE streaming, Pub/Sub offload, and Cloud Tasks for long-running AI jobs"
url: "https://hashnode.com/posts/async-ai-pipelines-in-fastapi-streaming-queuing-and-long-running-requests/6ab9461f42cf4f425fc0e85a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Async AI Pipelines in FastAPI: Streaming, Queuing, and Long-Running Requests](https://blog.madhav.dev/async-ai-pipelines-in-fastapi-streaming-queuing-and-long-running-requests?utm_source=hashnode&utm_medium=feed)

Three patterns for LLM calls that don't block Cloud Run — SSE streaming, Pub/Sub offload, and Cloud Tasks for long-running AI jobs

Sep 27 · 5 min read · blog.madhav.dev  
Read the article

-   [#fastapi](https://hashnode.com/tag/fastapi)
-   [#openai](https://hashnode.com/tag/openai)
-   [#python](https://hashnode.com/tag/python)
-   [#async](https://hashnode.com/tag/async)
-   [#cloud-run](https://hashnode.com/tag/cloud-run)
-   [#pub-sub](https://hashnode.com/tag/pub-sub)
-   [#cloud-tasks](https://hashnode.com/tag/cloud-tasks)

## Written by

[Madhav Bhasin](https://hashnode.com/@madhavbhasin)

@madhavbhasin · Noida, India

  
[View profile](https://hashnode.com/@madhavbhasin)

Production patterns for backend engineers who are tired of hello-world tutorials.

Senior full-stack engineer and engineering lead with 5+ years building cloud-native systems at scale. I write about the things the docs don't cover — GCP, FastAPI, Terraform, event-driven architecture, and AI-powered backends. No hello-world demos.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
