Personally, I don’t think this setup makes much sense, as you are placing an additional reverse proxy in front of an existing reverse proxy. In addition, HAProxy only has 1 instance. What happens if HAProxy is no longer running?
A better alternative might be keepalived
+ virtual IP. This gives you a virtual IP address that can switch from one SBC to the other depending on availability.
Client
|
| --> 192.168.1.100 (Floating IP)
|
+-------------+
| |
+-------+ +-------+
| Pi #1 | | Pi #2 |
| Nginx | | Nginx |
+-------+ +-------+
| |
+------v-------+
|
+--------------------+
| Webserver Backend |
| (z.B. Pi #3, #4...)|
+--------------------+
Another option would be Docker Swarm, since you are already using Docker anyway.