Prompt

How do I build event-driven APIs without Kubernetes?

Technology / Cloud Infrastructure1 observationLast seen Oct 25, 2026

Latest observation

Oct 25, 2026OpenAI APIWeb search: off

You can absolutely build event-driven APIs without Kubernetes. The core idea is to separate HTTP/API handling from event processing, then choose lightweight deployment and messaging tools that fit your scale.

1) Start with the architecture

A common pattern is:

  • API service receives requests
  • It publishes events to a broker or queue
  • Workers/consumers process events asynchronously
  • Consumers may update databases, call other services, or emit new events

This gives you:

  • decoupling
  • retryability
  • better scalability
  • simpler API latency

2) Pick a deployment model without Kubernetes

You have several good options:

Option A: Single VM or a few VMs

Good for small to medium systems.

  • Run API and workers as separate processes or containers
  • Use systemd, supervisord, or Docker Compose
  • Put Nginx/Caddy/Traefik in front for routing and TLS

Best when you want simplicity and low ops overhead.

Option B: Serverless

Great when traffic is spiky or event-driven.

  • API Gateway + serverless functions
  • Event bus / queue triggers workers
  • Examples:
    • AWS: API Gateway + Lambda + SQS/SNS/EventBridge
    • GCP: API Gateway/Cloud Run + Pub/Sub
    • Azure: API Management + Functions + Service Bus

Best when you want minimal infrastructure management.

Option C: Managed containers without Kubernetes

A strong middle ground.

  • AWS ECS/Fargate
  • Azure Container Apps
  • Google Cloud Run
  • Fly.io / Render / Railway

You deploy containers, but don’t manage a cluster.

3) Use the right messaging layer

Your event-driven API depends on how you move events around.

Simple queues

Use these for task-style async work:

  • Redis queues (BullMQ, RQ, Sidekiq-style systems)
  • RabbitMQ
  • AWS SQS
  • Azure Service Bus

Event streams / pub-sub

Use these when multiple consumers need the same event:

  • Kafka
  • AWS SNS + SQS
  • GCP Pub/Sub
  • NATS / JetStream

If you’re starting out, SQS/RabbitMQ/Redis Streams are often easier than Kafka.

4) Design your API for async workflows

Instead of making clients wait for long jobs:

  1. Client sends request
  2. API validates input
  3. API stores a job record or domain record
  4. API emits an event
  5. API returns 202 Accepted with a tracking ID
  6. Client polls status or receives webhook/callback

Example:

  • POST /orders
  • returns { orderId, status: "processing" }
  • worker later marks it confirmed or failed

5) Make event handling reliable

To avoid lost or duplicated work:

  • Use idempotency keys
  • Make consumers idempotent
  • Use a retry policy with backoff
  • Send failed messages to a dead-letter queue
  • Store event/job state in a database
  • Prefer the outbox pattern if publishing events after DB writes

The outbox pattern is especially important:

  • write business data and an “event to send” in the same DB transaction
  • a separate process publishes the event afterward

6) Keep the API and workers separate

Even without Kubernetes, split responsibilities:

  • API process: auth, validation, request handling, event publishing
  • Worker process: event consumption, retries, side effects
  • Scheduler/cron process: periodic jobs if needed

You can run each as:

  • a separate Docker container
  • a separate process on the same VM
  • separate serverless functions

7) Add observability early

Event-driven systems are harder to debug unless you track them well.

Use:

  • structured logs
  • correlation/request IDs
  • tracing
  • metrics for queue depth, retry counts, error rates
  • dashboards and alerts

Important things to measure:

  • time from request to completion
  • consumer lag
  • dead-letter queue size
  • processing failures per event type

8) A practical stack example

Here are a few non-Kubernetes setups that work well:

Simple VM setup

  • API: FastAPI / Express / Go HTTP server
  • Worker: separate process using Celery / BullMQ / Sidekiq-style queue consumer
  • Queue: Redis or RabbitMQ
  • Proxy: Nginx/Caddy
  • Deploy: Docker Compose + systemd

Cloud-managed setup

  • API: Cloud Run / ECS Fargate / Azure Container Apps
  • Events: SQS / PubSub / Service Bus
  • Workers: same platform, separate service
  • Storage: managed Postgres

Serverless setup

  • API: API Gateway + Lambda
  • Events: SQS/EventBridge
  • Workers: Lambda consumers
  • Storage: DynamoDB or Postgres via managed service

9) When to choose what

  • Low traffic, simple ops: VM + Docker Compose
  • Spiky traffic, low ops: serverless
  • Container-based but no K8s: Cloud Run / ECS Fargate / Container Apps
  • Heavy event throughput: managed queue + containerized workers
  • Need pub-sub fanout: SNS/EventBridge/PubSub/Kafka

10) Rule of thumb

If you’re not using Kubernetes, the best path is usually:

API container + queue/broker + worker container + managed hosting

That gives you event-driven behavior without orchestration complexity.

If you want, I can also give you:

  1. a reference architecture diagram,
  2. a Docker Compose example, or
  3. a specific stack recommendation based on your language/cloud.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.