Running the web stack: deployments, certificates and capacity
You run a web stack end to end with zero-downtime deployments, automatic certificate renewal, capacity measurement and traffic management during incidents.
Level 501 · 15 lessons · 12 practice labs
Lessons
Deployment
- Release directories and an atomic symlink switch
- Blue-green and canary releases with Nginx
- Restarting app servers without dropping connections
- Short task: switch releases under load without a single error
Certificates
- Automatic certificates with ACME
- Certificate inventory and expiry tracking
- An internal certificate authority for internal services
- Short task: find why a certificate didn't renew and repair the automation
Capacity
- Load testing: measuring with wrk and k6
- A capacity model: bottleneck and ceiling
- System limits for web servers: descriptors and backlog
- Short task: a capacity report for campaign day
Incidents
- Responding to a traffic spike: cache, limits and a holding page
- After the incident: reporting a web outage
- Capstone: run a three-tier site through a simulated week: releases, renewals and a spike
Practice labs
- Release a version by switching a symlink: Unpack the new version in its own directory, switch the current link and show one command returns to the previous version.
- Deploy to two app servers in turn: Take each server out of the balancer, update it, pass the health check and return it, watching the error rate throughout.
- Ship a release with a schema change without downtime: Apply a backward-compatible schema change first, switch traffic blue-green and roll back without data loss when a problem appears.
- Obtain a certificate from the internal ACME server: Request a certificate for the site from the internal ACME server, install it and verify its validity dates.
- Automate and test certificate renewal: Set up the renewal timer, add a hook reloading the web server after renewal and test it with a forced renewal.
- Inventory and monitor certificates across all tiers: Scan certificates on proxy, app and database connections, report those nearing expiry and repair the one with broken renewal.
- Take the site's baseline load measurement: Send steady load to your own lab site and record requests per second and the 95th percentile response time.
- Find which tier of the stack saturates: Raise load in steps and watch proxy, app and database metrics together to identify the tier that saturates first.
- Balance connection pools across the tiers: Size proxy keepalive, app worker count and database connection limit against each other and show with a load test that queueing is gone.
- Determine which tier a 5xx rise comes from: From the status and upstream fields in the proxy log show the errors come from one app server.
- Diagnose and fix database connection exhaustion: Tie intermittent 500 errors to the database connection limit, find the leaking app instance and fix the pool setting.
- Manage a cascading outage and write the review: In a cascading outage triggered by a slow query on Mercanköşk Otelcilik's booking site, shed load, restore service and write a review with lasting fixes.
About this course
You run a web stack end to end with zero-downtime deployments, automatic certificate renewal, capacity measurement and traffic management during incidents.
What you will learn
- Deployment
- Certificates
- Capacity
- Incidents
Prerequisites
You should be experienced in the topics of the same path up to level 401.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at level 501; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.