Skip to content

Instantly share code, notes, and snippets.

@emekdahl
Created September 30, 2024 20:13
Show Gist options
  • Save emekdahl/8854ff08223b4a6285ea0756f7278c98 to your computer and use it in GitHub Desktop.
Save emekdahl/8854ff08223b4a6285ea0756f7278c98 to your computer and use it in GitHub Desktop.
Pre-Production Checklist

Pre-production Checklist

This checklist contains points that must be satisfied during implementation and verified prior to release.

Please note that all items in the design checklist that were verified at the end of the design phase, must still be satisfied at release time (e.g. the design doc must be up-to-date, the SLOs must be consistent, ...).

πŸ”§ Maintainability

Maintainability affects team productivity and system availability. If maintainability is low, the team will take a longer time to change the service in production and it will cause longer MTTR (Mean Time To Recover) in case of failures.

Check name Short Description Level C Level B Level A
Unit test It has unit tests. And the unit tests are running in a CI system. βœ… βœ… βœ…
High Test coverage Its test coverage is over 80%. βœ… βœ…
Config in env-var Its config can be overridden via environment variable. βœ… βœ…
dockerignore It has dockerignore to reduce the Docker image size. βœ… βœ…
No latest tag Its Docker image tag is not latest or master. βœ… βœ…
Dependabot Its dependencies are automatically updated. βœ… βœ…
Automated build Its build process is automated (binary build and Docker image build is in this scope). βœ… βœ… βœ…
Automatic build Its automated build process is running in CI/CD system. βœ…
Automated deploy Its deploy process is automated. βœ… βœ… βœ…
Automatic deploy Its automated deploy process is running in CI/CD system. βœ… βœ…
Gradual deploy Its deploy can be gradual if you want. βœ…
Automated rollback Its rollback process is automated. βœ… βœ…

πŸ“‰ Observability

Observability affects team productivity and system availability. If observability is low, the team will take a longer time to notice/investigate a problem occurred in production. And it will make MTTR (Mean Time To Recover) longer.

Check name Short Description Level C Level B Level A
Tracing Its requests are traced by Datadog APM. See Configure Tracing βœ… βœ… βœ…
Timeboard Its Datadog Timeboard is created. βœ… βœ…
Screenboard Its Datadog Screenboard is created. βœ…
AWS metrics Its AWS projects are integrated with Datadog. βœ… βœ…
Actionable alert Its Datadog Monitors are created. And those alerts are actionable. βœ… βœ… βœ…
Warning alert Its warning alerts are sent to Slack or a ticket system instead of PagerDuty. βœ… βœ…
Critical alert Its critical alerts are sent to PagerDuty. βœ… βœ…
OnCall rotation It has a PagerDuty team, escalation policy, schedules. βœ… βœ…
OnCall playbooks It has OnCall playbooks. βœ…
Log to STDOUT Its logs are output to STDOUT/STDERR. βœ… βœ… βœ…
Log as JSON Its logs are emitted in container log format. βœ… βœ… βœ…
Log with annotation Its logs have Request ID annotation βœ… βœ… βœ…
Profiling It is profiled by AWS Stackdriver Profiler. βœ… βœ…
Error tracking Its errors are tracked by Sentry. βœ… βœ…

✈️ Reliability

Reliability affects availability and productivity. If reliability is low, your system will break down often. The team will have to take time to fix it. Then, both system availability and team productivity will be decreased.

Check name Short Description Level C Level B Level A
Manual Scale It can be manually scaled horizontally to handle changes in workload. βœ…
Auto Scale It automatically scales horizontally to handle fluctuating workloads, its HPA is set as described in the Resource Requests and Limits documentation, and can be scaled manually if needed. βœ… βœ…
CPU req/limit Its CPU limit and request are set as described in the Resource Requests and Limits documentation. βœ… βœ… βœ…
Memory req/limit Its memory resource request value is as same as limit value. βœ… βœ… βœ…
Capacity planning It can handle the expected load: either load test has been performed, or the expected traffic is under control (e.g., by Gateway). βœ… βœ…
Zero downtime deploy Its deploy process does not cause service degradation or downtime (e.g. error rate does not increase during deploy). βœ… βœ…
Graceful shutdown It can stop gracefully. βœ… βœ…
Graceful degradation It keeps working, at least partially, while dependencies (e.g. other service or database) are not working partially or completely. βœ… βœ…
PreStop It has a preStop. See more on Configure PreStop. βœ… βœ…
PDB It has a PodDisruptionBudget set as described in the Configure Pod Distription Budget βœ… βœ… βœ…
Liveness Probe It has a health check (endpoint) for liveness probe. And liveness probe is configured. See more on Configure Liveness Probe. βœ… βœ… βœ…
Readiness Probe It has a health check (endpoint) for readiness probe. And readiness probe is configured. βœ… βœ…
Timeout It sets an appropriate timeout for requests over a network. βœ… βœ…
Smart retry It performs smart retries when interacting with dependencies (e.g. other services or database). βœ…

πŸ”’ Security

If security is low, customer and company data will be stolen or fabricated (Data breaches).

Check name Short Description Level C Level B Level A
Security review It has completed the security design review by security team. βœ… βœ…
Non-root user Its docker container runs as non-root user βœ… βœ… βœ…
Secrets Its sensitive configuration is stored in Kubernetes secrets. βœ… βœ… βœ…
Non-sensitive log It does not write sensitive information to app logs (STDOUT/STDERR). βœ… βœ… βœ…

πŸ“‹ Accessibility

Accessibility affects team/organization productivity. If accessibility is low, getting information about the microservice will be difficult for both people inside/outside the team. It reduces organization productivity.

Check name Short Description Level C Level B Level A
Design Doc Its design doc is up to date with the implementation. βœ… βœ… βœ…
Description It has service description. βœ… βœ… βœ…
Contact It has contact info about the owners. βœ… βœ… βœ…
Source repo It has links to source repo. βœ… βœ… βœ…
Docs It has links to docs for users. βœ… βœ… βœ…
SLOs Its dashboard shows SLOs. βœ… βœ… βœ…

πŸ“ Data Storage

Checks for services that have one or more data stores (e.g. databases, blob storage, ...). In addition to these checks, please refer to the service-specific sections below.

Check name Short Description Level C Level B Level A
Data Replication Its data is replicated to BigQuery (if required). βœ… βœ…
Minimal Operator Privileges Personnel has minimal access privileges and accesses are auditable. βœ… βœ…
Recovery It can be recovered from backup; the procedure has been defined and tested. βœ… βœ…
Fast Recovery It can be recovered from backup in less than 2 hours; the procedure is described in the OnCall playbook, and it is practiced every 6 months. βœ…
PIT Recovery Point-in-time recovery from backup can be completed in less than 2 hours. βœ…
Timeboard Its AWS databases have a Datadog Timeboard. βœ… βœ…

AWS Postgres

Checks specific to services using AWS Postgres

Check name Short Description Level C Level B Level A
Maintenance Window Its databases have a defined maintenance window (during core hours). βœ… βœ… βœ…
Regional HA Its databases have regional HA enabled.. βœ… βœ…
Read Replicas Its databases have one or more read replicas, and it uses them for reads that do not need strict consistency. βœ…
Missing Master It keeps correctly serving idempotent requests with no side-effects when the master is unavailable (e.g. by sending all reads to the read replicas and returning internal error to all other requests).. βœ…
Failover Tests It keeps running with minimal disruption during, and fully recovers after, a database maintenance or failover. βœ… βœ…
Operational Guidelines Its databases are in compliance with the Database Operational guidelines, so that they do not fall outside the Database SLA. βœ… βœ… βœ…
Automatic Backups Its databases have automatic backups enabled. βœ… βœ… βœ…
Automatic Storage Increase Its databases have automatic storage increase enabled. βœ… βœ…
Replication Lag Alerts should be sent if replication lag (Seconds Behind Master in Stackdriver) is >300s. βœ… βœ…
CPU CPU usage of each instance (including replicas) should be <50% during peak load, and alerts should be sent if it increases to >80%. βœ… βœ… βœ…
Minimal Data Privileges It has one or more dedicated MySQL users (not root) that have only the bare minimum set of required privileges (e.g. only SELECT and INSERT, but no UPDATE, DELETE or any other DDL/admin privileges). If the service has both admin and non-admin endpoints, they should use different users with different permissions. βœ… βœ…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment