DEV Community

Mustafa ERBAY
Mustafa ERBAY

Posted on • Originally published at mustafaerbay.com.tr

5 Tactics to Reduce On-Call Stress in Distributed Systems

Introduction: The Inevitable Reality of On-Call

When it comes to distributed systems, being on-call is an unavoidable responsibility. Whether you’re managing a production ERP or supporting the infrastructure of a large e-commerce site, knowing that the systems run 24/7 is both reassuring and anxiety‑inducing. Unexpected notifications, incidents that demand immediate action, and fragmented sleep can place a heavy stress load on on‑call engineers. This not only reduces personal quality of life but can also lead to burnout and higher error rates over time. Over the years I’ve developed a handful of practical strategies to manage this pressure and enjoy a more sustainable on‑call experience. In this post we’ll dive deep into five core tactics that helped me reduce on‑call stress in distributed systems.

On‑call isn’t just about reacting to technical problems; it’s also about making the process psychologically and operationally manageable. That means not only handling emergencies but also taking preventive measures, optimizing communication channels, and setting personal boundaries. My goal is to turn on‑call from a chore into a more tolerable duty of keeping system health. Along the way, protecting both the systems and our own mental and physical health is essential.

1. Optimize Proactive Monitoring and Alerting

One of the biggest sources of on‑call stress is unnecessary or false alerts. If we set up alerting mechanisms without deeply understanding our systems’ behavior, we stay on high alert and may miss real problems. In my experience, while managing the ERP of a manufacturing company, midnight disk‑space alerts repeatedly woke me up. Those alerts usually stemmed from small file‑cleanup jobs that could be resolved within a few weeks. Such “noisy” alerts make it hard to feel that the system is truly in a critical state.

To fix this, I refined the alert thresholds and trigger conditions. For example, instead of alerting simply when PostgreSQL’s WAL size reaches a certain level, I started watching for more specific conditions such as a WAL rotation taking longer than expected or WAL files accumulating abnormally on disk. That meant detecting delays in processing *-wal.ready or *-wal.done files in the pg_wal/archive_status directory. I also monitored the log‑collection rate of the systemd journald service to spot situations where the system generated heavy logs but a bottleneck prevented their processing.

# Example: rate limiting for journald
sudo sed -i 's/#RateLimitIntervalSec=/RateLimitIntervalSec=5s/' /etc/systemd/journald.conf
sudo sed -i 's/#RateLimitBurstSec=/RateLimitBurstSec=100/' /etc/systemd/journald.conf
sudo systemctl restart systemd-journald
Enter fullscreen mode Exit fullscreen mode

These fine‑tuned adjustments let us distinguish genuine strain from routine noise. For instance, instead of flagging a server when CPU usage hits 90 %, we watch for a critical service’s CPU staying high, or Redis’s OOM eviction rate crossing a defined threshold. In the backend of my side‑project financial calculator, I monitored sudden spikes in request processing time and data‑fetch latency to catch potential issues before users felt any impact.

ℹ️ Alert Sensitivity

Setting the right alert thresholds is the first step to reducing on‑call stress. Minimize false positives by carefully analyzing your metrics and configuring alerts to fire only for conditions that truly require intervention. For example, latency of a specific application’s requests may be a more meaningful alert than overall CPU usage of a web server.

2. Eliminate Repetitive Tasks with Automation

Many of the problems we encounter on‑call involve repeatable, predictable operational steps. Restarting a service, cleaning disk space, checking a database connection, or updating a configuration file are all examples. These tasks are time‑consuming and prone to human error. I once manually restarted an API service on a large bank’s internal platform and accidentally rebooted the test server instead of production. Fortunately the impact was limited, but the incident reinforced how critical automation is.

After that experience I focused on building automation scripts for common operational chores. Using systemd units to automatically restart services, scheduling regular disk‑cleanup scripts with cron or systemd timers, and writing scripts that automatically adjust Redis OOM eviction policies or trigger disk clean‑up when a threshold is crossed. In my own systems, especially for frequently updated microservices, I integrated automatic deployment strategies (blue‑green, canary) into CI/CD pipelines to minimize manual intervention.

# Example: Python script to check and set Redis OOM eviction policy
import redis

def check_and_set_redis_oom_policy(host='localhost', port=6379, db=0, policy='allkeys-lru'):
    try:
        r = redis.StrictRedis(host=host, port=port, db=db, decode_responses=True)
        current_policy = r.config_get('maxmemory-policy')['maxmemory-policy']
        if current_policy != policy:
            r.config_set('maxmemory-policy', policy)
            print(f"Redis maxmemory-policy set from '{current_policy}'.")
        else:
            print(f"Redis maxmemory-policy already set to '{policy}'.")
    except redis.exceptions.ConnectionError as e:
        print(f"Failed to connect to Redis: {e}")

# Usage example
check_and_set_redis_oom_policy()
Enter fullscreen mode Exit fullscreen mode

These automations free the on‑call engineer to focus on more complex, strategic work. When an incident occurs, the first step can be to run an automation script, which both speeds up resolution and eliminates human error. I even built a mechanism for an Android spam‑blocking app that automatically blacklists a sender after a certain number of spam calls, solving the problem without any manual steps.

💡 Automate Repetitive Tasks

A significant portion of on‑call time is spent on routine tasks. Use scripts, systemd timers, cron jobs, or CI/CD tools to automate them. This helps preserve both your time and energy.

3. Create Comprehensive Documentation and Runbooks

Another major source of on‑call stress is uncertainty. When you encounter an issue and don’t know what to do, anxiety spikes. In complex distributed systems, pinpointing the root cause and following the correct remediation steps can be time‑consuming and challenging. For example, while working on a client’s supply‑chain integration, tracking down a fault in the order flow took hours. A detailed runbook at that time would have accelerated the process dramatically.

Runbooks are practical guides that outline the steps to take for a specific class of problem. They should include symptoms, possible root causes, verification steps, and remediation suggestions. For instance, a runbook for an N+1 query issue might detail how to determine whether the problem stems from missing indexes in PostgreSQL or from misuse of an ORM, and then walk through EXPLAIN ANALYZE interpretation, index checks, and ORM configuration tweaks.

-- Example: Using EXPLAIN ANALYZE for an N+1 query in PostgreSQL
EXPLAIN ANALYZE
SELECT u.name, o.order_date
FROM users u
JOIN orders o ON u.id = o.user_id
WHERE u.id = 123;
Enter fullscreen mode Exit fullscreen mode

Such runbooks are invaluable for new team members or when an experienced engineer isn’t available. I publish runbooks for common system‑admin issues on my blog, covering topics like debugging systemd units or configuring an Nginx reverse proxy. In the backend of my side‑project financial calculator, I documented potential performance bottlenecks and how to address them, which helps future contributors understand the system faster.

⚠️ Risks of Inadequate Documentation

Insufficient or outdated documentation can cause panic and mistakes during on‑call. Time lost troubleshooting can extend outage duration and negatively affect both customer satisfaction and team morale.


Example Risks:

  • Incorrect remediation steps
  • Delays in identifying the root cause
  • Higher manual error rate
  • Knowledge becoming siloed in a few individuals

4. Clarify Communication Protocols and Strengthen Team Collaboration

Being on‑call in a distributed environment is rarely a solo effort. Issues often span multiple components or teams, so clear communication protocols and strong collaboration are essential for stress reduction. When a service crashes, you need to know whether the problem lies in the network, the database, or the application itself, and you must reach the right people quickly. In the past, a delay in the shipping module of a production ERP involved both the development and operations teams, but vague communication channels meant only a few people were aware of the incident, prolonging resolution.

To avoid such situations I first created an “on‑call escalation policy.” This policy defines who to contact when an incident occurs, how to escalate if a response isn’t received within a set time, and which communication tools (Slack, email, phone) to use. Regular post‑mortem meetings also help us learn from incidents and prevent recurrence. In those meetings we discuss the root cause, the response process, and improvement suggestions.

ℹ️ Effective Communication Channels

Effective communication during on‑call ensures fast and accurate problem resolution. Consider these channels:

  • Instant Messaging (Slack, Teams): For urgent coordination.
  • Email: For formal announcements and detailed reporting.
  • Pager (PagerDuty, Opsgenie): Automated escalation for critical alerts.
  • Shared Documentation Platforms (Confluence, Notion): For runbooks and knowledge sharing.

To strengthen collaboration we not only fix issues but also work together on proactive system health improvements. For example, as a “chaos engineering” exercise we randomly terminate services to test resilience and jointly address weak points. In my Android spam‑blocking app I set up a feedback channel for users, allowing us to gather insights and iterate on improvements—making users feel valued and the app better.

5. Set Personal Boundaries and Prevent Burnout

The on‑call role tests both technical skills and mental/physical endurance. Constant “availability” can erode work‑life balance and eventually lead to burnout. Early in my career I believed I had to be reachable at all times, which harmed my social life and personal development. Once, during a client project, nonstop alerts over a weekend left me barely sleeping, and my performance the following week suffered dramatically.

These experiences taught me the importance of establishing personal boundaries. First, step away from work‑related communication tools outside of on‑call hours. For instance, avoid checking work email while on vacation or mute Slack notifications. Even during on‑call shifts, it can help to designate “do‑not‑disturb” windows—e.g., only receive truly critical alerts after a certain hour and defer the rest to the morning. I even write occasional blog posts that step away from deep technical topics to discuss career and mental‑health considerations, drawing attention to this issue.

🔥 Burnout Symptoms

Burnout is a serious risk for on‑call engineers. If you notice any of the following signs, take a step back, rest, or seek help:

  • Persistent fatigue and lack of energy
  • Decreased motivation at work
  • Irritability and impatience
  • Difficulty concentrating
  • Physical ailments (headaches, sleep problems)
  • Feelings of isolation

Within the team, distributing on‑call rotations fairly and supporting each other also helps prevent burnout. Covering for a teammate, helping out during holidays, or offering morale boosts after a tough incident are small gestures that strengthen team bonds and keep everyone happier and more productive. In my Android spam‑blocking app I let users control notification frequency, giving them a sense of control. Similarly, giving on‑call engineers some control over their schedules can reduce stress.

Conclusion: Building a Sustainable On‑Call Culture

Being on‑call for distributed systems can become a sustainable and less stressful experience when managed with the right strategies. Proactive monitoring and alert optimization, automation of repetitive tasks, thorough documentation and runbooks, clear communication protocols, and personal boundaries are the core principles that guide us. Applying these tactics not only improves individual engineer well‑being but also boosts overall system reliability and operational efficiency. Remember, the best system is the one that requires the fewest on‑call interventions.

These five tactics make the on‑call process more manageable, allowing engineers to spend time not just fixing problems but also improving systems. In the long run this is critical for both career growth and personal life balance. As I’ve seen, as technology advances and systems become more complex, strategic approaches like these become increasingly valuable. Ultimately, turning on‑call from a nightmare into a learning and growth opportunity is in our hands.

Top comments (0)