snappyloop case
Talk · Snappy Loop

One Bot, One Pod, One Problem at a Time

Resources and references from the talk, grouped by technology — how a single long-polling Telegram bot became webhook-driven workers on Kubernetes.

Vasil Kulakov
Vasil Kulakov
SRE · Engineering Manager
LinkedIn →

Telegram Bot API

dev

Chat platform providing distribution, auth, push, and the bot runtime.

Long Polling

dev

Pull-based update delivery — no inbound traffic, no TLS, single-replica only.

Webhooks

dev ops

Push-based update delivery that enables multiple bot worker replicas.

Webhook Security

ops

Four-layer defense: firewall, ingress, IP check, and request signature verification.

Golang Bot Worker

dev

Stateless worker handling Telegram updates, sessions, and outbound API calls.

Symfony Storage API

dev

Internal PHP API for persisting users, courses, and session state.

PostgreSQL

ops

Primary relational store and source of truth for all persistent data.

Kubernetes

devops

Container orchestration for multi-replica bot workers with autoscaling and rolling updates.

Telegram Mini Apps

dev

Web UI embedded in Telegram for progress, flashcards, profile, and settings.

Backend for Frontend

dev

Public API layer between the mini-app frontend and the internal storage API.

Cloudflare Tunnel

devops

Outbound-only tunnel connecting an external BFF perimeter back to the cluster.

Redis

dev ops

Shared session store, write buffer, and global rate-limit counters across replicas.

Central Rate Controller

dev

Outbound API proxy with global counters — one ceiling across all replicas.

Observability & SLOs

devops

Multi-window burn-rate alerts on webhook ack latency and reply success rate.

Playwright Uptime Probes

devops

Multi-city, multi-ISP headless browser checks verifying full mini-app render.

Helm

devops

One chart, one deployment per language bot with per-bot values and secrets.

SOPS & Git-Ops Secrets

devops

Encrypted secrets committed to the helm-charts repo, decrypted at deploy time.

Kubernetes CronJob

devops

Scheduled notification delivery as a separate binary, outside the bot worker.