3 min read
On this page

Feedback Loops

A feedback loop occurs when the output of a system becomes an input to that same system. The result cycles back and influences the next result. Feedback loops are everywhere — in your home thermostat, in social media, in your habits, and in the software systems that run the world.

The Everyday Version

The Thermostat

The simplest and most intuitive feedback loop.

The cycle:
1. You set the thermostat to 21 degrees Celsius
2. The thermostat measures the room: 18 degrees
3. Gap detected: too cold → turn on the heater
4. Room warms to 21 degrees
5. Thermostat measures again: 21 degrees
6. Gap closed → turn off the heater
7. Room cools to 20 degrees
8. Thermostat measures again: too cold → heater on
9. Repeat forever

This is a negative feedback loop (stabilizing):
- Output (temperature) feeds back into the system
- The system corrects itself toward the target
- Without the feedback, the heater would run forever
  or never turn on

Social Media Engagement

A very different kind of feedback loop.

The cycle:
1. You post something that gets lots of likes
2. The algorithm notices: "This content gets engagement"
3. Algorithm shows your content to more people
4. More people see it → more likes and comments
5. Algorithm notices even more engagement
6. Algorithm pushes it to even more people
7. The cycle accelerates

This is a positive feedback loop (amplifying):
- Success breeds more success
- The system pushes further from where it started
- Without some limit, it runs away

The same loop works in reverse:
1. You post something that gets no engagement
2. Algorithm buries it
3. Fewer people see it → even less engagement
4. Algorithm buries it further

Personal Habits

Positive (reinforcing) loop — exercising:
1. You exercise → feel good
2. Feeling good → more motivation to exercise
3. More exercise → better fitness → feels even better
4. Cycle reinforces itself

Positive (reinforcing) loop — procrastination:
1. You avoid a task → feel temporary relief
2. Task grows more daunting over time
3. More daunting → more avoidance
4. More avoidance → more stress → more avoidance
5. Cycle reinforces itself (in a bad direction)

Note: "positive" in feedback loop terminology means amplifying, not necessarily good. Positive loops can amplify good things or bad things.

The Housing Market

Prices rising:
1. Housing prices go up
2. Buyers rush to buy before prices go higher
3. More demand pushes prices up further
4. More buyers rush in
5. Cycle continues until something breaks it
   (interest rate hike, recession, regulation)

Prices falling:
1. Housing prices drop
2. Buyers wait, expecting further drops
3. Less demand pushes prices down further
4. More buyers wait
5. Cycle continues until something stabilizes it

Two Types of Feedback Loops

Negative feedback loops (stabilizing):
- Push the system back toward a target
- Self-correcting
- Examples: thermostat, cruise control, budget tracking
- Without them: systems drift out of control

Positive feedback loops (amplifying):
- Push the system further from where it started
- Self-reinforcing
- Examples: compound interest, viral content, bank runs
- Without limits: systems explode or collapse

Most stable systems have negative feedback loops keeping them in check. Most crises involve positive feedback loops running unchecked.

Connecting to Technology

Autoscaling

Cloud systems use feedback loops to handle changing demand.

The autoscaling loop:
1. Monitor: CPU usage is at 90% across servers
2. Decide: That is above the 70% threshold
3. Act: Launch 3 more servers
4. Monitor: CPU usage drops to 50%
5. Decide: That is within the acceptable range
6. Act: Do nothing, stay at current capacity
7. Monitor: CPU usage drops to 20% (traffic decreased)
8. Decide: That is below the 30% threshold
9. Act: Remove 2 servers to save cost
10. Back to step 1

This is a negative feedback loop:
- High load → add servers → load decreases
- Low load → remove servers → load increases slightly
- The system stabilizes around the target range
Autoscaling gone wrong (positive feedback loop):
1. Server is overloaded → health check fails
2. Load balancer removes the server from the pool
3. Remaining servers get more traffic → they overload
4. More health checks fail → more servers removed
5. Even fewer servers → even more overload
6. Entire system collapses

This is called a "death spiral" — a positive feedback
loop with no brake.

Prevention: Set a minimum number of servers that
cannot be removed regardless of health checks.

A/B Testing

A/B testing creates a structured feedback loop for decision-making.

The A/B testing loop:
1. Hypothesis: "A green button will get more clicks
   than a blue button"
2. Experiment: Show green to half the users, blue to half
3. Measure: Green gets 12% more clicks
4. Learn: Green is better for this audience
5. Apply: Make all buttons green
6. New hypothesis: "What about the button text?"
7. Back to step 2

Each cycle feeds knowledge back into the next decision.
Without this loop, you are guessing.
With it, you are converging on what works.

Monitoring & Alerting

Operations teams rely on feedback loops to keep systems healthy.

The monitoring loop:
1. Metrics collected: response time, error rate, CPU usage
2. Alert triggered: Error rate exceeded 5%
3. Engineer investigates: Finds a bad database query
4. Fix deployed: Query optimized
5. Metrics improve: Error rate drops to 0.1%
6. Continue monitoring

Without this loop:
- Errors accumulate silently
- Users leave without telling you why
- You discover the problem days or weeks later

The speed of the loop matters:
- Real-time monitoring: Fix issues in minutes
- Daily reports: Fix issues in hours
- Monthly reviews: Fix issues in weeks
- No monitoring: Fix issues when customers complain loudly

CI/CD Feedback

Continuous Integration and Continuous Deployment create rapid feedback loops for developers.

The CI/CD loop:
1. Developer writes code
2. Code is automatically tested (CI)
3. Tests pass → code is deployed (CD)
4. Monitoring detects any issues in production
5. Developer sees the impact of their change
6. Developer writes the next change, informed by results

Without CI/CD:
1. Developer writes code for months
2. All code is tested at once → hundreds of failures
3. Nobody knows which change broke what
4. Weeks of debugging
5. Slow, painful release
6. Developer gets no feedback until it is too late

Tight loops catch problems early.
Loose loops let problems compound.

Feedback Loop Speed

The speed of a feedback loop determines how quickly a system can adapt.

Feedback loop speeds in software:

Compiler errors:      Seconds
- You typed it wrong → instant notification

Unit tests:           Seconds to minutes
- Your logic is wrong → caught before it reaches anyone

Code review:          Hours to days
- Your approach has issues → caught before merge

Integration tests:    Minutes to hours
- Your code conflicts with other code → caught before deploy

Production monitoring: Minutes
- Your change caused problems → caught before many users affected

Customer complaints:  Days to weeks
- Something is wrong → caught after many users are affected

The further right you go, the more expensive the fix.
Faster feedback loops save time, money, and frustration.

Designing Good Feedback Loops

Principles:

1. Make the loop fast
   - Shorter cycles mean quicker corrections
   - A thermostat that checks every hour is less
     useful than one that checks every minute

2. Measure the right thing
   - A feedback loop is only as good as its sensor
   - Measuring lines of code tells you nothing about quality
   - Measuring customer satisfaction tells you a lot

3. Include both directions
   - Scale up AND scale down
   - Alert on problems AND confirm when problems resolve
   - Reward good behavior AND correct bad behavior

4. Add limits to positive feedback loops
   - Cap the maximum number of servers
   - Limit how viral content can spread
   - Set circuit breakers on runaway processes

5. Avoid over-correction
   - A thermostat that overreacts creates oscillation
     (too hot, then too cold, then too hot)
   - Gradual adjustments are more stable than dramatic ones

Common Pitfalls

  • Ignoring feedback entirely. Building something and never checking if it works as intended. Without feedback, problems grow silently.
  • Feedback loops that are too slow. Monthly performance reviews cannot catch daily problems. Match the loop speed to the problem speed.
  • Measuring the wrong signal. If your feedback loop measures page views but you care about customer satisfaction, you will optimize for the wrong thing.
  • Missing the loop in the first place. Many runaway problems (server death spirals, viral misinformation, escalating costs) are positive feedback loops that nobody identified early.
  • Over-correcting. Reacting too strongly to each signal creates oscillation — the system never stabilizes because it keeps overshooting.
  • Not testing the feedback mechanism itself. If your alerting system is down, you have no feedback loop at all. Monitor the monitor.

Key Takeaways

  • Feedback loops occur when a system's output becomes its input. They are the mechanism by which systems self-correct or self-amplify.
  • Negative (stabilizing) feedback loops keep systems on target. Positive (amplifying) feedback loops push systems further from where they started.
  • In technology, feedback loops power autoscaling, monitoring, CI/CD, and A/B testing.
  • The speed of a feedback loop determines how quickly you can detect and fix problems.
  • Positive feedback loops need limits, or they will run away in one direction.
  • The most important question about any system: "Where are the feedback loops, and are they working?"