SShortSingh.
Back to feed

Horizontal vs Vertical Scaling: Why Stateless Apps Handle Traffic Spikes Better

0
·1 views

A developer's side project built on a single Node.js EC2 instance collapsed under sudden traffic after a streamer shared its URL, pushing CPU to 99% and triggering out-of-memory errors. The experience prompted a deeper look at the two core scaling strategies: vertical scaling, which upgrades a single machine's resources but hits cost and capacity ceilings, and horizontal scaling, which distributes load across multiple identical instances. The key obstacle to horizontal scaling was the app's reliance on in-memory session storage, local caching, and disk writes, all of which broke when traffic was routed to new nodes. The solution required making the application stateless by offloading session and cache data to external services like Redis or a shared database. This architectural shift allows instances to be added or removed dynamically, eliminates single points of failure, and often reduces costs compared to running one oversized server.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Freelancer Builds Open-Source Rust CLI to Score Reddit Leads Using AI

A freelancer developed Cypher, an open-source command-line tool written in Rust, to automate the process of finding potential clients on Reddit. The tool scans specified subreddits, filters posts by keywords, and uses an AI layer to extract signals such as intent, budget, urgency, and fit, scoring each lead from 0 to 100. It supports local inference via Ollama as well as cloud AI providers including OpenAI, Groq, and Gemini, with a configurable threshold to escalate low-confidence results to a stronger model. Lead data is stored locally in a SQLite database, requiring no cloud accounts or external tracking. The project was built to address the poor signal-to-noise ratio of manually monitoring Reddit for hiring posts, where competitors often respond before a relevant thread is even discovered.

0
ProgrammingDEV Community ·

x402 Payment Endpoint Registry Has 14,085 Listings, but 10,508 Are From One Suspended Domain

A cataloguing effort tracking x402 payment endpoints found that 10,508 of the 14,085 registered endpoints belong to a single suspended provider, leaving just 3,577 genuine entries as of July 2026. Of those, only 2,131 pass verification checks, while 1,446 — roughly two in five — fail. The catalogue probes each endpoint every 10 minutes via automated checks, testing for responsiveness, valid 402 responses, well-formed payment challenges, and price accuracy. The verification is considered critical because x402 requires an AI agent to pay before confirming whether a response is useful, meaning a dead endpoint costs real money with no recourse. Testnet endpoints, which return valid responses but cannot process real transactions, are kept in the catalogue but excluded from discovery results to prevent misdirected payments.

0
ProgrammingDEV Community ·

Why Owning Your Email Domain Could Protect Your Entire Digital Identity

Gmail is a powerful and widely used service, but its automated account systems can lock users out permanently, cutting off access to every service tied to that email address. Because Google owns the address and sets the rules, users have little recourse if something goes wrong — a risk many accepted by default rather than by choice. Registering a personal domain gives users a portable, permanent email address that remains theirs regardless of which email provider they use. Providers like Fastmail, Proton, and Purelymail simplify the technical setup, and migration can be done gradually by updating critical accounts first. At roughly ten dollars a year, a personal domain offers long-term control over one's digital identity — though it does come with ongoing subscription costs and a migration effort that Gmail users currently avoid.

0
ProgrammingDEV Community ·

AWS Developer Associate Certification: Why Hands-On Practice Beats Theory

Ntombizakhona Mabaso, an AWS Certified Developer Associate, has shared her certification journey and key preparation strategies on DEV Community. She advises candidates to prioritize building real projects over passive study, arguing that practical experience makes troubleshooting and exam questions far easier to handle. Mabaso also highlights that AWS allows higher-level certifications, such as the DevOps Engineer Professional, to automatically renew qualifying lower-level credentials, offering a more efficient path to staying current. For those not yet ready to pursue a Professional-level exam, AWS Skill Builder now lets eligible certification holders renew through maintenance activities without retaking the full paid exam. Her recommended hands-on exercises include building REST APIs with Lambda and DynamoDB, setting up CI/CD pipelines, and debugging IAM permission issues within real AWS environments.

Horizontal vs Vertical Scaling: Why Stateless Apps Handle Traffic Spikes Better · ShortSingh