Hello,

I understand that within an upstream block, some servers can be marked as
backup, meaning NGINX will only use them if all primary servers fail.

In my case, I have some servers running over HTTP and would like to
configure HTTPS servers as backups. However, since an upstream can only use
one protocol, this setup isn't currently possible.

One solution I had in mind was to define a primary HTTP upstream and fall
back to a secondary HTTPS upstream if the first one fails, meaning all
servers in the primary upstream are unavailable. It could give something
like the example below. However, I couldn't find a way to implement this in
the NGINX documentation.

Is there a feature like this planned, or one that could be considered for
future development?

Thank you,
Sébastien

---

upstream main_upstream {
  server <ip here>:80
  server <ip here>:80
  <etc>
}

upstream secondary_upstream {
  server <ip here>:443
  server <ip here>:443
  <etc>
}

location / {
  proxy_pass http://main_upstream *backup https://secondary_upstream
<https://secondary_upstream>*;
  <etc>
}
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to