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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
U
Unit 42
M
MIT News - Artificial intelligence
小众软件
小众软件
P
Proofpoint News Feed
雷峰网
雷峰网
L
LangChain Blog
S
SegmentFault 最新的问题
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
WordPress大学
WordPress大学
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
Recent Announcements
Recent Announcements
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow 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
5 Ways to Deploy Code (Without Making Your Users Mad)
Ajibola jr. MSc, Cybersecurity · 2026-06-26 · via DEV Community

Picture this: You just spent weeks building an awesome new feature. It's fully tested and ready to go. But when you hit "Deploy," your entire application goes down for 5 minutes, and your users are met with a blank loading screen.

Not a good look.

In the world of DevOps and Cloud Infrastructure, how you roll out updates matters just as much as the code itself. AWS Elastic Beanstalk gives us 5 distinct deployment policies to handle this smoothly.

Let's break them down from simplest to most robust so you know exactly which one to pick for your next project.

1. All at Once (The Speed Demon)

This is the simplest method. Elastic Beanstalk takes all your existing servers, shuts them down, deploys the new code, and boots them back up simultaneously.

[ Old App ] ─> SHUTDOWN ALL ─> DEPLOY NEW ─> [ New App ]

  • The Good: It’s incredibly fast.
  • The Bad: Your app goes completely offline during the deploy.
  • When to use it: Only in development environments where downtime doesn't matter. Never use this in production!

2. Rolling (The Line Worker)

Instead of updating everything at once, Beanstalk splits your servers into batches (e.g., 2 at a time). It takes the first batch offline, updates them, brings them back online, and then moves to the next batch.

Batch 1: [ Updating... ] Batch 2: [ Running Old App ]

Batch 1: [ Running New App ] Batch 2: [ Updating... ]

  • The Good: No total downtime! Your app stays online.
  • The Bad: While a batch is updating, your overall server capacity drops. Plus, users might experience a "mixed state" where refreshing switches them between the old and new version.
  • When to use it: Production environments that can handle a temporary dip in bandwidth.

3. Rolling with Additional Batch (The Safe Substitution)

To fix the capacity problem of standard rolling, this policy launches a brand new batch of instances first. Once those new servers are healthy and running the updated code, Beanstalk starts rolling the update through the old servers.

[Old Servers: 100% Capacity ] + [ New Batch Added: +25% Capacity]

[Roll updates through old servers safely]

  • The Good: Your application maintains 100% of its required capacity the entire time. No slowdowns for users.
  • The Bad: It takes a bit longer to complete, and you temporarily pay for a few extra instances during the deployment window.
  • When to use it: Great for production apps that experience steady, heavy traffic.

4. Immutable (The Clean Slate)
Instead of messing with your live servers, Beanstalk leaves them alone. It spins up a completely separate, parallel group of brand-new instances running the new code. Once the new group passes all health checks, traffic is instantly swapped over, and the old servers are terminated.

Group A (Live): [ Old App ] ──┐

                             ├───> Swaps traffic instantly!

Group B (New) : [ New App ] ──┘

  • The Good: Insanely safe. If the new code crashes, Beanstalk just deletes the new group, and your live users never notice a thing. Rollback is effortless.
  • The Bad: It doubles your server count during deployment, which can temporarily spike your cloud bill.
  • When to use it: Highly critical production applications where deployment failure cannot be risked.

5. Traffic Splitting / Canary (The Diplomat)

This is the gold standard for testing features live. Beanstalk launches a new set of instances alongside the old ones but only sends a tiny fraction of real traffic (e.g., 10%) to the new version. If no errors pop up after a set amount of time, it rolls out the rest.

Traffic ──► [ 90% to Old Version ]

──► [ 10% to New Version (Testing) ]

  • The Good: Low blast radius. If there is a hidden bug, it only impacts 10% of your users before you automatically roll it back.
  • The Bad: Complex to configure and manage.
  • When to use it: Major version upgrades or introducing massive features where you want real-world validation before a full release.

Summary Cheat Sheet:
Need speed in dev? 👉 All at Once
Need no downtime on a budget? 👉 Rolling
Need full capacity during deployment? 👉 Rolling with Additional Batch
Need the safest rollback strategy? 👉 Immutable
Want to test features on real users safely? 👉 Traffic Splitting

Which deployment policy does your team use at work? Let's talk about the pros and cons in the comments!