Skip to content

DigitalOcean load balancers, and what's behind them

A DigitalOcean load balancer is a managed service that distributes traffic to a group of backend resources, so a service does not depend on a single server. Duskwatch is an independent iPhone app for DigitalOcean, in development; it shows which droplets behind each load balancer are off, its rules and health check, and sends a push when it errors or nothing runs behind it.

Updated

  • 2 casespush: errored, or no droplet running behind it
  • 2 checksin a row before either push
  • 200–399HTTP codes that pass a health check
  • 3 typesshown: regional, network or global

01Backends

The droplets behind it

The screen lists the droplets behind the load balancer, assigned by name or by tag, each with its own state.

  • 1 of 2 droplets behind it is off

    web-02 is off and web-01 carries the traffic. The evidence comes from droplet status.

  • No droplets behind it

    No droplet has the tag web.

02Alerts

A push when it errors or has nothing behind it

With alerts on, two cases send a push: DigitalOcean reports the load balancer errored, or not one droplet behind it is running.

  • Both repeat until someone taps "I'm on it" or traffic has somewhere to go again.
  • One droplet off out of two is that droplet's own push: the site is up, just thinner.
The load balancer pushes, with synthetic names
  • Time sensitive

    lb-web is in error

    acme-prod

    Since 02:14.

  • Time sensitive

    lb-web: no droplets running behind it

    acme-prod

    Since 02:14.

  • lb-web is working again

    acme-prod

    Was down for 6 min.

The permission load balancer alerts need, and incidents

Load balancer alerts use the same extra read-only permission as Kubernetes, certificate and firewall alerts; a team whose alerts predate it is asked once. During a DigitalOcean incident affecting load balancers in its region, the alert waits under the incident.

From DigitalOcean's docs

03Settings

Forwarding rules, health check and settings

Rules run from entry protocol and port to the target; without one, a load balancer accepts no traffic. Below sit the health check and the settings.

Health check settings the app shows, with example values
Shown asMeaningExample
ChecksThe protocol, port and path it requestsHTTP, port 80, path /
EverySeconds between health checks10 seconds
Unhealthy afterConsecutive failures before traffic stops3 checks
Healthy again afterConsecutive passes before traffic returns5 checks
The other settings on the screen

Type (regional, network or global), size, redirect from HTTP to HTTPS, sticky sessions, PROXY protocol and backend keepalive.

From DigitalOcean's docs

04Certificates

Certificates on HTTPS rules

A certificate on an HTTPS rule lists lb-web under "Used by", so one that ends in 9 days is traced to the load balancer it would break.

  • Certificate expires in 9 d

    static-example, used by lb-web. In use on a load balancer, so it also gets the certificate push.

  • Let's Encrypt renews itself

    While DigitalOcean manages the domain's DNS. A custom certificate needs a new upload.

From DigitalOcean's docs

05Troubleshooting

Every droplet is on, but visitors get errors

The cause is usually inside a droplet, or between it and the load balancer.

  1. 1

    Open each droplet behind it

    Its metrics, recent restarts and firewall findings.

  2. 2

    Hand off to your SSH app

    Check the service itself.

  3. 3

    Open the load balancer in DigitalOcean

    Change the rules or the health check there.

From DigitalOcean's docs

What Duskwatch doesn't do here

  • No health check result per droplet: the API does not report it
  • No load balancer push while some droplets behind it still run
  • No editing forwarding rules, health checks or settings
  • No creating, resizing or deleting load balancers

Questions

  • How do I know a backend droplet is down?

    DigitalOcean stops sending traffic to a droplet after it fails the health check a set number of times in a row. Duskwatch shows which droplets behind the load balancer are off, from each droplet's own status.

  • Will I get a push when a load balancer has a problem?

    Yes, with alerts on: when DigitalOcean reports it errored, or when no droplet behind it is running, and again when it works. One droplet going off while others run sends that droplet's push instead.

  • Which load balancer settings can I see?

    Forwarding rules, the health check, type, size, HTTPS redirect, sticky sessions, PROXY protocol and keepalive. You change them in DigitalOcean.

  • Why does it show droplet status instead of the health check?

    The load balancer's API object reports the health check's settings, not its result for each droplet. The finding says that its evidence comes from the droplet status.

Duskwatch is in development. Join the waitlist to hear when it's on the App Store.

We'll email you once when Duskwatch is on the App Store. One-click unsubscribe. How we handle your data

Basic monitoring is free; alerts, most actions and advanced features are part of Duskwatch Pro. See plans and prices