Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
14 posts found #deployment
Kubernetes Deployments and ReplicaSets: Labels, Rolling Updates, Rollout History and Undo
DevOps PART 04

Kubernetes Deployments and ReplicaSets: Labels, Rolling Updates, Rollout History and Undo

A Deployment finds its pods through a label selector, creates a ReplicaSet per pod template and drives rolling updates with maxSurge, maxUnavailable and minReadySeconds. We watch a four-replica rollout second by second, then see a missing tag hit progressDeadlineSeconds, the gap rollout undo opens with Git, bundling changes with pause, the change-cause trap and immutable image tags, all with real output.

8 Nov 2026 10 min 3
Parallel, Matrix, input and Deploy Stages in Jenkins
DevOps PART 09

Parallel, Matrix, input and Deploy Stages in Jenkins

We deploy the same package first to staging and, after an input approval that holds no agent, to production with sshagent, rsync and systemctl; Lockable Resources solves concurrency and milestone solves ordering. A deploy script with a health check, real lock output where an old build deploys after a new one, inversePrecedence, failFast, a Node 22/24 matrix and the app_offline.htm structure for IIS.

8 Nov 2026 10 min 4
End-to-End Zero Downtime: Deploying Bookstore with Blue-Green and Canary via GitHub Actions
DevOps PART 09

End-to-End Zero Downtime: Deploying Bookstore with Blue-Green and Canary via GitHub Actions

All pieces of the series in a single GitHub Actions workflow: build the image once, a migration gate and an expand migration bundle, deploy to the idle color, a smoke test through the preview, 10% and 50% canary gates, a full switch and a manual rollback job. Run locally with act, the pipeline failed four times before succeeding: a gate scanning Down(), act's artifact v7 incompatibility, a preview pointing at the old color, and too little canary traffic.

8 Nov 2026 15 min 5
Rollback or Roll Forward? Rollback Plans, Kill Switches and Automated Rollback Criteria
DevOps PART 08

Rollback or Roll Forward? Rollback Plans, Kill Switches and Automated Rollback Criteria

There are four ways back: kill switch, artifact rollback, roll forward and limiting the impact; the choice depends on flags, the readiness of the previous artifact and schema compatibility. An atomic symlink switch, a Down migration that restores the column but not its 300,004 names, git revert of a merge commit, an automated trigger rolling back a 20%-failing version in 10 s (18 of 85 requests failed), a runbook template and measuring with DORA.

8 Nov 2026 10 min 6
Feature Flags: Decoupling Deploy from Release with Microsoft.FeatureManagement and OpenFeature
DevOps PART 07

Feature Flags: Decoupling Deploy from Release with Microsoft.FeatureManagement and OpenFeature

A feature flag lets you deploy code and release behavior with a config change. Targeting with Microsoft.FeatureManagement 4.8 (10.1% of 1000 users, sticky per user), variants, WithFeatureGate on minimal APIs and a kill switch that takes effect in 0.4 s; a signal-based flag service and a tested structural directive in Angular; the targeting boolean flag returning false through OpenFeature's preview provider, and flag debt.

8 Nov 2026 11 min 5
Where Migrations Fit in a Deploy: Expand-Contract, EF Core Migration Bundles and Backward-Compatible Schemas
DevOps PART 06

Where Migrations Fit in a Deploy: Expand-Contract, EF Core Migration Bundles and Backward-Compatible Schemas

Safely splitting a column while two versions run side by side takes three deploys: add and dual-write, switch to the new columns, remove the old one. Real runs on PostgreSQL with 300,000 rows: v1 and v2 working together on one schema, the transaction error of a CONCURRENTLY index, deadlocks in parallel bundles because Npgsql's migration lock is tied to the transaction, 135 ms batches instead of an UPDATE locking for 8 s, and a review gate that stops DROP COLUMN.

8 Nov 2026 13 min 6
Canary Releases: Shifting Traffic by Percentage, Deciding with Metrics and Automated Analysis
DevOps PART 05

Canary Releases: Shifting Traffic by Percentage, Deciding with Metrics and Automated Analysis

A canary runs the new version with a small share of traffic and decides by comparing it with a control running at the same time. Weights in Nginx (900/100, not sticky), a user-sticky canary with split_clients and the empty-key trap, sticky cookies in 1.30; 4.80% vs 0% over 4,000 requests but a meaningless result over 19, a gate returning WAIT/ABORT/PROMOTE, Gateway API weights, and Argo Rollouts aborting a faulty version automatically.

8 Nov 2026 13 min 5
Blue-Green Deployment: Two Environments with Nginx, App Service Slots and Instant Switchback
DevOps PART 04

Blue-Green Deployment: Two Environments with Nginx, App Service Slots and Instant Switchback

Blue-green installs the new version on the idle environment, runs a smoke test and switches traffic with a single reload; going back is the same reload. A preview port in Nginx, a smoke test with a version check, an error-free probe through switch and switchback, a 4 s request finishing on blue during the reload; App Service slot swap warm-up and slot setting pitfalls, a Service selector switch in Kubernetes, and the limit a shared database imposes.

8 Nov 2026 10 min 5
Rolling Deployments: Updating Servers One by One, maxSurge and maxUnavailable in Kubernetes
DevOps PART 03

Rolling Deployments: Updating Servers One by One, maxSurge and maxUnavailable in Kubernetes

A rolling deployment updates the fleet piece by piece; done right there is no outage, but two versions live side by side for a while. Three instances behind Nginx: a naive script dropped 2 of 90 GETs, while a script with drain and readiness checks passed 237 GETs and 90 POSTs without errors. Choosing maxSurge/maxUnavailable and minReadySeconds in Kubernetes, why exceeding progressDeadlineSeconds doesn't roll back, and when rolling is the wrong choice.

8 Nov 2026 12 min 6
Prerequisites for Zero Downtime: Graceful Shutdown, Readiness, Stateless Apps and Backward Compatibility
DevOps PART 02

Prerequisites for Zero Downtime: Graceful Shutdown, Readiness, Stateless Apps and Backward Compatibility

No deployment strategy can save an app that doesn't finish its work when stopping and doesn't tell the truth about being ready. With real runs: a 5 s request is cut with an RST when ShutdownTimeout is 2 s, Docker's 1 s wait produces exit code 137 (SIGKILL), readiness returns 503 during the drain while the API keeps serving 200, separate Data Protection key rings throw CryptographicException, and a deleted Angular chunk turns into a ChunkLoadError.

8 Nov 2026 13 min 5
Deploy vs Release: Why Downtime Happens and a Map of Deployment Strategies
DevOps PART 01

Deploy vs Release: Why Downtime Happens and a Map of Deployment Strategies

A deploy installs code in an environment, a release is when users see the new behavior; teams that can separate the two split the risk. In a single-container recreate deploy behind Nginx, 12 requests failed within 2.5 seconds. The five sources of downtime, a map of recreate, rolling, blue-green, canary, shadow, A/B and feature flags, a decision table, and the risk = blast radius × detection time calculation.

8 Nov 2026 10 min 4
Deploying with GitHub Actions 2: Your Own Linux Server via SSH, Docker Images and GHCR
DevOps PART 11

Deploying with GitHub Actions 2: Your Own Linux Server via SSH, Docker Images and GHCR

Build the image once in GitHub Actions, push it to GHCR and send only the digest to the server over SSH; the server pulls it with Docker Compose and restarts. metadata-action, build-push-action and the gha cache backend (28 s down to 4 s), actions/attest, pinning known_hosts and what happens when the host key changes, rollback with .env.previous; real runs with act.

8 Nov 2026 12 min 5
Blog Map