Failover

Automatic retries during service outage or slowdown.

Failover

Images are clickable.

Manifests

services:
  responding:
    image: codelev/echo-spring:latest
    deploy:
      labels:
        - "millau.enabled=true"
        - "millau.hosts=*"
        - "millau.port=9000"
        - "millau.retry=10"
        - "millau.timeout=2"
    environment:
      - DELAY=1
    ports:
      - "9000"
    networks:
      - millau
  overloaded:
    image: codelev/echo-spring:latest
    deploy:
      labels:
        - "millau.enabled=true"
        - "millau.hosts=*"
        - "millau.port=9000"
        - "millau.retry=10"
        - "millau.timeout=2"
    environment:
      - DELAY=5
    ports:
      - "9000"
    networks:
      - millau
networks:
  millau:
    external: true

Features

Timed in

curl localhost:8080/rest/echo

returns HTTP 200 and responds from the responding service with a 1-second delay, which is within the millau.timeout=2 threshold.

Timed out

The overloaded service responds with a 5-second delay, exceeding the millau.timeout=2 threshold.

Retry Period

Once the overloaded service times out, Millau marks it as unavailable for millau.retry=10 seconds and retries the request with the next available service.