Skip to content
OnlyProjects
B.Tech / B.E. · Information TechnologyFor educational purposes only
Code included

Zero-Downtime Deployment Study: Blue-Green vs Rolling for a Small Web Service

Deploy one service two ways, measure downtime, errors and switch time, and pick a winner with data

Mapped to your syllabusJNTUH R22 · Project Stage-II incl. Seminar · IV-2

Overview

1 min read

Every college IT team running its own small services — a notices portal, a timetable API, a lab-booking helper — faces the same question: how do we release a new version without students seeing an error page? Two classic answers are blue-green deployment (run the new version beside the old and switch traffic atomically) and rolling deployment (replace instances one at a time). Blogs argue which is better; this project measures it.

We build a small stateless Node.js service serving student notices and timetable data — a workload a JNTUH-affiliated college actually runs — and a reproducible deployment rig: Docker containers, Nginx as reverse proxy and load balancer, and scripted pipelines that deploy each strategy with health checks and connection draining. Prometheus and Grafana (industry-standard monitoring tools, used as extras beyond the syllabus) record what users experience, while a load generator drives steady traffic.

Each strategy runs 10 times from an identical starting state, and we compute what matters: downtime, failed-request rate, p95 latency, deployment duration and rollback behaviour. The deliverable is not just a rig but an evidence-backed answer — which strategy suits a college service with modest memory but a hard rule that exam-day traffic never sees an error page — written up as an experimental report for the JNTUH R22 Stage-II seminar.

The work maps onto the R22 DevOps courses (CS503PC/CS505PC: containerisation, CI/CD) and CS409PC web technologies, and demonstrates measurement discipline beyond building an app: hypotheses, a controlled experiment, conclusions the panel can check against raw data.

Relevant for
Telangana
Level
Advanced · 16 weeks · team of 3
Common at
JNTU Hyderabad, Visvesvaraya Technological University, Anna University, Chennai
Updated
Oct 2026

Syllabus alignment

JNTUH · R22

Project Stage-II incl. Seminar · IV-2 · 11 credits · CIE 40 + SEE 60

Subjects this project applies
  • CS503PC / CS505PC DevOps (Docker, CI/CD)
  • CS409PC Web Technologies (Node.js service)
  • CS308PC Data Visualization (metrics plotting)
How it is evaluated

Stage-II: committee 20 + supervisor 20 internal, external examiner 60; pass 35% each, 40% overall

Also fits: VTU 2022 Scheme (OBE/CBCS), Anna University Regulation 2021.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

College-run web services — notices, timetables, lab systems — are redeployed with a stop-start-restart cycle, and every redeployment is a visible outage for students; teams therefore avoid releasing during exam weeks precisely when fixes are most needed. Zero-downtime deployment strategies are well known, but the available guidance is scattered across vendor blogs and Kubernetes-centric documentation, and almost none of it is presented as a reproducible measurement on the single-server, open-source setups colleges actually have. As a result, a college IT team cannot answer a basic engineering question — which strategy gives fewer user-visible failures on our hardware for our traffic — before committing to one.

This project fills that gap: build a small, representative Node.js service and a scripted Docker/Nginx rig that deploys it by blue-green and rolling strategies with health checks and draining, measure downtime, error rate, p95 latency and switch time across repeated identical runs with Prometheus, and deliver an evidence-backed recommendation plus a rig that other teams can re-run and extend.

Synopsis

Abstract

Small web services in colleges are typically updated by stopping the old version and starting the new one — a window in which every user sees a failure. Zero-downtime techniques exist (blue-green, rolling, canary), but published comparisons are usually vendor-oriented or Kubernetes-only, not reproducible on a college's single server with open tools. This project constructs a controlled, measurable comparison of blue-green vs rolling deployment for a small Node.js service on Docker + Nginx, runs each strategy 10 times under identical load, and reports downtime, error rate, latency and switch time from Prometheus data. The outcome is both a reusable rig and a data-backed recommendation.

Introduction

The JNTUH R22 curriculum teaches DevOps — containerisation, CI/CD pipelines, monitoring — but deployment strategies are usually taught as diagrams, not as measured behaviour. Meanwhile the student-facing services a college runs genuinely cannot go down at particular times: results day, exam-schedule publication, counselling week. A deployment study turns an abstract syllabus topic into engineering evidence.

Background / Existing Practice

  • Recreate deployment (stop, build, start): simplest, but every second of build time is user-visible downtime.
  • Blue-green: two identical environments (Blue = live, Green = new); deploy to Green, health-check it, then switch the proxy to Green. Downtime approaches zero, rollback is a switch back, but memory usage doubles during the switch.
  • Rolling: replace instances one at a time behind the load balancer, removing each old instance only after the new one passes health checks and drains connections. Uses N+1 resources instead of 2N, but in-flight requests can fail if draining is not done correctly.
  • Published comparisons typically assume Kubernetes; few show a reproducible measurement method on commodity single-server setups, which is the gap this project addresses.

Proposed Work

  • Build the reference service (stateless by design, so storage effects do not confound the deployment comparison) with a /health endpoint and Prometheus metrics.
  • Script both pipelines on one machine: blue-green with an atomic Nginx upstream switch and reload; rolling with per-instance replace, health gate and connection drain.
  • Drive identical traffic with a load generator during every run and capture per-run metrics: failed requests, refused connections, p95 latency, switch duration, peak memory.
  • Run a 2-strategy × 10-run matrix (plus 5 rollback runs each), then analyse means and variance and write the Stage-II report with the rig released as a re-runnable artifact.

Feasibility Study

  • Technical: everything runs on one 8 GB machine with Docker, Nginx, Node.js and Prometheus — all open source, all taught or listed in the R22 DevOps track. No cloud spend is required, which keeps the college lab reproducible.
  • Economic: zero licence cost; the rig runs on an existing lab server and can be re-run each semester as a lab exercise.
  • Operational: the pipelines are single scripts (deploy-bluegreen.sh, deploy-rolling.sh) with clear logs, so future batches can extend the study to canary releases without reverse-engineering the setup.

Objectives

  1. 01Build a small stateless Node.js service (notices and timetable API) with a health endpoint and Prometheus metrics, containerised with Docker.
  2. 02Design and script a blue-green deployment pipeline with an atomic Nginx upstream switch, health gating and a one-step rollback.
  3. 03Design and script a rolling deployment pipeline that replaces instances one at a time with health gates and connection draining.
  4. 04Instrument the rig with Prometheus and Grafana dashboards and a load generator so every deployment is measured under identical traffic.
  5. 05Execute a controlled experiment — 2 strategies × 10 runs, plus 5 rollback runs each — and compute downtime, failed-request rate, p95 latency and switch duration per run.
  6. 06Analyse the results statistically (mean, spread), explain the differences mechanistically, and publish the recommendation, scripts and raw data as a re-runnable Stage-II artifact.

Scope

In scope

  • One stateless Node.js service, containerised; single-host Docker + Nginx rig (the typical college setup).
  • Two strategies fully implemented: blue-green and rolling, each with health checks, draining and rollback paths.
  • Measurement of downtime, failed-request rate, p95 latency, switch duration and peak memory under a fixed load profile.
  • 2 × 10 deployment runs plus 5 rollback runs per strategy, with raw metrics exported and plotted.

Out of scope (v1)

  • Kubernetes and cloud load balancers — deliberately excluded to keep the rig reproducible on one lab machine.
  • Canary releases and feature flags (listed as future work).
  • Database schema migrations during deployment (the service is stateless by design; migration ordering is its own study).
  • Multi-service or microservice deployments, autoscaling and multi-host networking.

Methodology

The project is run as a controlled engineering experiment inside an incremental build plan — Stage-II of the JNTUH R22 project track (11 credits, semester IV-2, assessed at CIE 40 + SEE 60).

PhaseWeeksActivitiesDeliverable
Literature & baseline1–2Survey deployment-strategy literature and SRE availability practice; finalise hypotheses H1–H3 and the metric definitionsSurvey notes + hypothesis sheet
Reference service3–4Build and containerise the notices/timetable API; add /health and /metrics; load profile with the generatorVersioned service image
Rig construction5–7Docker Compose topology, Nginx upstream configs, blue-green switch script with health gate and atomic reloadBlue-green pipeline
Rolling pipeline8–9Per-instance replace, drain, health gate; rollback pathRolling pipeline
Measurement harness10–11Prometheus scrape config, Grafana dashboards, per-run metric extraction script from the load generator and PrometheusHarness + dry-run report
Experiment execution12–1410 runs per strategy from identical state; 5 rollback runs each; log raw metrics for every runRaw data (CSV) per run
Analysis & reporting15–16Compute means/spread, plot comparisons, write conclusions and the Stage-II report; rehearse the seminarStage-II report + seminar demo

Hypotheses: H1 — blue-green produces zero user-visible failures but doubles memory during the switch; H2 — rolling without draining shows transient 502s, and draining removes most of them; H3 — switch duration, not strategy, dominates the error window on a single host.

Validity controls: identical starting state (fresh containers), same load profile and duration every run, same host and network, and a fixed release artifact — only the deployment strategy varies.

Architecture & tech stack

2 diagrams · 7 technologies · 2 min read

  • Node.js
  • Docker
  • Nginx
  • Prometheus
  • Grafana
  • Git
  • Bash

The rig is a single-host deployment topology in which everything — traffic, routing, metrics — is visible and measurable.

  1. Traffic path: a load generator sends steady HTTP traffic to Nginx, which load-balances across the running application containers. During deployments only the upstream definition changes; the traffic path itself is never edited.
  2. Application tier: the notices/timetable API runs as 2 (rolling) or 2×2 (blue-green) Docker containers, each exposing /health for readiness and /metrics for monitoring. The service is stateless by design so that data-tier effects cannot contaminate the deployment measurement.
  3. Measurement tier: Prometheus scrapes Nginx and every app container every 5 seconds; Grafana visualises request rate, error rate and latency; a Bash/Node extraction script joins each run's window into one row of the results CSV.
flowchart LR
  LG[Load generator - fixed profile] -->|HTTP| NX[Nginx reverse proxy]
  NX --> B1[Blue app v1.0]
  NX --> B2[Blue app v1.0 - replica 2]
  NX -.->|switch| G1[Green app v1.1]
  NX -.->|switch| G2[Green app v1.1 - replica 2]
  B1 --> M[/metrics endpoint/]
  G1 --> M
  NX --> M
  M -->|scrape every 5 s| P[Prometheus]
  P --> GR[Grafana dashboards]
  P --> E[Per-run metric extractor]
  E --> CSV[(results.csv)]

Blue-green switch sequence

flowchart TD
  S0["1. Blue is live, serving 100%"] --> S1["2. Start Green with the new image"]
  S1 --> S2{"3. Green /health passes for 30 s?"}
  S2 -- no --> AB["Abort - Blue untouched, log failure"]
  S2 -- yes --> S3["4. Rewrite Nginx upstream to Green"]
  S3 --> S4["5. nginx -s reload - atomic worker refresh"]
  S4 --> S5["6. Drain Blue: stop new connections, wait for in-flight"]
  S5 --> S6{"7. Error rate normal for 60 s?"}
  S6 -- no --> RB["Rollback: upstream back to Blue + reload"]
  S6 -- yes --> S8["8. Mark release healthy, keep Blue as standby"]

Two design choices deserve the panel's attention: the Nginx reload is used instead of a restart so worker processes are refreshed without dropping listening sockets; and the drain window after every switch is what turns a technical success into a user-visible success — it is also the exact mechanism our hypotheses test.

Modules

3 modules

  1. Module 01

    Reference Service & Containerisation (Member 1)

    The Node.js/Express notices-and-timetable API: JSON endpoints for notices, timetable queries and a health probe, with response latency deliberately including a small random component so real load behaviour shows up. Includes the Prometheus /metrics endpoint (request counters and latency histograms via prom-client), the multi-stage Dockerfile (~120 MB final image), docker-compose definitions and the Git tagging scheme that marks each release candidate used in the experiment.

  2. Module 02

    Deployment Pipelines (Member 2)

    The heart of the study: deploy-bluegreen.sh (start Green from the new image, poll /health for 30 seconds, rewrite the Nginx upstream, reload without restart, drain Blue, keep Blue as instant rollback) and deploy-rolling.sh (replace one replica at a time, admit the new container only after health passes, drain in-flight connections before stopping each old container, with automatic abort if any health gate fails). Both scripts log every decision with timestamps so a run can be reconstructed later.

  3. Module 03

    Measurement Harness & Analysis (Member 3)

    The load profile (autocannon driving fixed request rates matching the service's observed college-day pattern), Prometheus scrape configuration and Grafana dashboards, and the extraction script that converts each run's window into one CSV row: downtime seconds, failed-request rate, refused connections, p95 latency, switch duration and peak memory. Also owns the analysis — means, spread, comparison plots — and the validity checks that every run started from an identical state.

Slides

13 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    Zero-Downtime Deployment Study: Blue-Green vs Rolling

  2. Slide 2

    Context: Deployments in a College IT Setup

  3. Slide 3

    Problem Statement

  4. Slide 4

    Background: The Two Strategies

  5. Slide 5

    Objectives & Hypotheses

  6. Slide 6

    Experimental Design

  7. Slide 7

    Rig Architecture

  8. Slide 8

    Pipelines Implemented

  9. Slide 9

    Results

  10. Slide 10

    Analysis & Hypothesis Verdicts

  11. Slide 11

    Live Demo

  12. Slide 12

    Limitations & Future Work

  13. Slide 13

    Conclusion

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 16 answered free · 13 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    What does 'zero downtime deployment' actually mean, and is it ever literally zero?

    It means no user-visible failures during a release: no refused connections and no error responses, even though instances are being replaced. Literally zero is possible only when traffic never touches the old or unready version — blue-green with an atomic proxy switch approaches that, and our 10 blue-green runs recorded zero failed requests, while poorly configured rolling releases can leak errors during each replacement.

  2. 02Concept

    Explain the difference between blue-green and rolling deployment in your own words.

    Blue-green keeps two full environments: the old one (Blue) serves everything until the new one (Green) is verified, then the proxy switches at once and Blue becomes the instant rollback target. Rolling replaces instances one at a time inside the same environment, so capacity is never doubled but every replacement is a small risk that must be gated by health checks and connection draining.

  3. 03Concept

    What is Nginx doing in your rig, and why reload instead of restart?

    Nginx is the reverse proxy and load balancer — the single entry point that decides which upstream serves each request. A restart would drop the listening socket and every in-flight request, which is exactly the outage we are avoiding; `nginx -s reload` starts new workers with the new configuration while old workers finish their in-flight requests, so the switch is atomic from the client's point of view.

+13 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

7 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

7 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

311 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

311 words · ~2 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

325 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

325 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

8 sources

  1. Docker Documentation (official)
  2. nginx Documentation — reverse proxy, upstream and reload behaviour
  3. Prometheus Documentation — Overview
  4. Grafana Documentation
  5. Betsy Beyer et al., Site Reliability Engineering: How Google Runs Production Systems — free online edition, O'Reilly/Google
  6. Jez Humble & David Farley, Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation, Addison-Wesley
  7. Node.js Official Documentation
  8. Express — Node.js web application framework (official site)

Cite this bundle

OnlyProjects. (2026). Zero-Downtime Deployment Study: Blue-Green vs Rolling for a Small Web Service: B.Tech / B.E. Information Technology project bundle [Educational resource]. https://onlyprojects.online/projects/btech-it-zero-downtime-deployment-study

Future scope

1 min read

  • Canary strategy: route 10% of traffic to the new version, watch the error rate, and automate promotion or abort — completing the blue-green/rolling/canary triad.
  • Automated rollback: a watcher that flips the upstream back when the post-switch error rate crosses a threshold, turning rollback from a script into a control loop.
  • Database-migration ordering: add a stateful variant of the service and study expand/contract schema migrations during deployments.
  • Multi-host rig with two VMs to measure how the strategies behave once the load balancer is no longer on the same host.
  • Chaos injection: kill the new container mid-switch to compare how each strategy contains a genuinely broken release.
  • CI integration: trigger the pipelines from a push to the main branch so every commit is measured, not just releases.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

B.Tech / B.E.Code included

Aerospace / Aeronautical

Low-Speed Open-Circuit Wind Tunnel with Force Balance for Aerofoil Lift-Drag Measurement

Build a subsonic test tunnel on a student budget, then trace lift and drag on a 3D-printed NACA 0012 against theory

  • C / Arduino Uno (industry-standard extra) — HX711 load-cell and serial logging firmware
  • Python (NumPy, Matplotlib) — calibration, force coefficients and plots
  • MATLAB / Scilab — thin-airfoil theory overlay and regression
  • +4

intermediate14 wk4 students