惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
Vercel News
Vercel News
Recent Announcements
Recent Announcements
B
Blog RSS Feed
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
D
Docker
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
L
LangChain Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Polling in System Design
Cibani Joe · 2026-06-22 · via DEV Community
Cover image for Polling in System Design

Cibani Joe

Polling in System Design...
Polling is about repeatedly checking a resource eg. Server for new data or change in status of the device at a regular interval of time.

Think of it like checking with the waiter, if our food is ready.

The waiter can act in three different ways, which can explain the three different polling method.

Short Polling

Say the waiter, gets your request "Is my order ready?" and takes it to the chef. If the order isn't ready, the waiter would come back with no response. Again, you ask him at a constant interval of time, and this happens until you get your order.

In the same way, in short polling, the client sends http request at a constant interval to the client, and the client responds to each of the request with the data if its ready or sends an empty string if the data is not ready.

Long Polling

Let's say the waiter, instead of returning with a null response when the chef says the food is not ready, stays next to the chef for a longer period to check on the food status. This is a depiction of long polling.

In long polling the client sends for a request and waits and holds until the data is returned. Once the client receives the response, the client immediately sends the next request, thus creating a near real-time connection.

It reduces unnecessary empty responses.

Event Stream

In this method, a constant connection is made between the client and the server. Which means a separate channel is forever active between the client and the server, and whenever an event occurs, the response is sent to the client through this port.

This connection is established only once and doesn't close unless the client or server closes the established connection, or due to some network issue.

Hence the response is triggered by events, and thus this form of polling is real-time.

The major drawback of this form of connection is that a separate port is set aside for the connection and cannot be reused until the connection is closed.

Choosing which form of polling technique to implement for your system, depends on the need and tradeoff you're willing to accept.