It is easy to mix diagnosis and repair during an incident. Changing path, port and permissions together makes success hard to explain and failure hard to undo. A controlled change begins before opening an editor.
State the expected effect
Before editing, record the symptom, the suspected wrong value and the request expected to change. A useful hypothesis predicts an outcome testable over a short interval.
Separate restoring availability from a lasting repair. Temporarily excluding a backend may reduce errors while leaving reduced capacity and a remaining replica repair.
Preserve the effective configuration
Locate the file and includes actually in use. A similar file from an old release is not a rollback of the current state. Preserve permissions, ownership and the application mechanism with the original version.
Configuration snapshots can contain internal addresses and secrets. Keep them within the training environment; article comments need only a redacted excerpt and your reasoning.
sudo nginx -T
systemctl cat shop-apiValidate syntax and change boundaries
nginx -t checks whether configuration is acceptable. It does not probe every backend or execute browser JavaScript. Add an application check to the plan rather than treating syntax validation as a substitute.
Compare the changed fragment with the original. If the diff contains unrelated values, narrow the change. Fewer changed variables make causal attribution clearer.
sudo nginx -tApply, observe and decide on rollback
Use the mechanism appropriate to the change: application configuration, a systemd unit and release code can require different actions. Repeat the original request, inspect logs and test required negative cases.
Define rollback criteria beforehand: syntax failure, a new fault, loss of required behavior or absent improvement. Rollback returns to a known state; it does not necessarily resolve the original incident.
From symptom to check
| Observation | Next check | How to interpret it |
|---|---|---|
| Edited file, unchanged behavior | Effective path and application mechanism | The process may not have received the change. |
| Valid syntax, failing request | Application probe and log | Syntax and operational behavior are different tests. |
| A new failure appeared | Diff and rollback criterion | Preserve the evidence and recover a controlled state. |
Common mistakes
- Changing several independent parameters together.
- Not knowing how the application loads configuration.
- Treating rollback as proof the original fault is repaired.
How to prove recovery
- A baseline, hypothesis and minimal diff are recorded.
- The appropriate application mechanism and user-level test were used.
- Rollback criteria and verification results are documented.
MINI INCIDENT
One successful check out of three
nginx -t succeeds and reload is accepted, but /api/orders still returns 401. Can the incident close, and what comparison comes next?
syntax: OK
reload: accepted
GET /api/orders: 401Explore the diagnosis
No: the user operation is still broken. Compare the header path and backend contract with the change hypothesis, and confirm the intended location was edited. Another blind reload provides no new evidence.
WORKSHOP
Workshop: explain the evidence and choose an action
One change improved one route and broke another.
before: /api=502 /assets=200
after: /api=200 /assets=404
change: modified shared locationCan the change be called successful?
Compare your reasoning
One route recovered while another regressed. Compare the diff boundary and required behavior before deciding to keep it.
Which question helps narrow the repair?
Compare your reasoning
Why did a shared change affect static assets when the hypothesis concerned the API? Check location selection and whether a narrower rule is appropriate.
What should be tested after rollback?
Compare your reasoning
Verify the known baseline and absence of the new regression. The original 502 can remain: rollback restores state rather than automatically resolving its cause.
CHECK YOUR UNDERSTANDING
Which change is easier to roll back with confidence?
Show explanation
One with a known baseline, bounded diff, application procedure and failure criterion. Small size alone does not replace those conditions.
No comments yet. Share your first impression or ask a question about this topic.