Score:0

howto make nginx with failover with containers that potentially don't exist

cn flag

I would like to use Nginx in front of a number of dockers containers, some of which (known) may be missing. Make sure that nginx does not block on "host not found" and stop the container which then restarts in a loop!

upstream frontend-ups {
        server frontend:80 max_fails=3 fail_timeout=5s;
        server 127.0.0.1 backup;
}
upstream api-ups {
        server api:8080 max_fails=3 fail_timeout=5s;
        server 127.0.0.1 backup;
}

But nginx alws clams : [emerg] 1#1: host not found in upstream "frontend:80" in /etc/nginx/conf.d/default.conf:5

Then solution : https://serverfault.com/a/480273/58035 not work!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.