How to connect a Dispatcher to a Load Balancer where the LB is in turn connected to other dispatchers
Hello Guys, Need your suggestions on a Apache/Dispatcher setup. (Please see the attached diagram)

Scenario
The customer has the standard AEM Publish and Apache web servers (shown as #1 in the diagram) already setup and there are multiple websites hosted here.
For one new site, there is a need to access the site through a new set of web servers (shown as #2 in the diagram) hosted on a 3rd party cloud.
If you look closely, this is a different-than-regular scenario with 2 web servers in the request path. Usually we have just one web layer load balancing AEM publish instances.
I am able to access the website via LB 1's URL origin-some-domain.com. LB has a valid certificate installed on it. LB accepts requests directly on port 443 and forces all requests to HTTP port 80 requests to port 443.
Problem
Next, I want to hook dispatcher #2 to this LB 1. There is no blocking firewall between 3rd party web servers and the LB.
Both the web servers #2 and Apache #2 do NOT have SSL enabled. I am not sure if SSL is needed on Apache #2 or Dispatcher #2 or both to communicate with LB 1. Please suggest if that is needed and guidelines around how to do it?
I see the following Adobe documentation for Dispatcher with SSL and AEM, I am not sure if that applies to Dispatcher in this scenario too:
My dispatcher config looks like this,
/farms
{
# First farm entry
/website
{
# Request headers that should be forwarded to the remote server.
/clientheaders
{
"*"
}
# Hostname globbing for farm selection (virtual domain addressing)
/virtualhosts
{
"*"
}
# The load will be balanced among these render instances
/renders
{
/rend01
{
/hostname "website-domain.com"
/port "443"
/timeout "00"
}
}
...
...
..
When i look at the logs, I see the following errors,
[Wed Jul 22 03:58:30 2020] [I] [pid 24179 (tid 139991841765120)] "HEAD /content/path-to-content/home.html" 502 - 889ms [website/rend01]
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Connected to backend rend01 (website-domain.com:443)
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Adding request header: host
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Adding request header: Via
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Adding request header: X-Forwarded-For
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Adding request header: Server-Agent
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Unable to parse response: premature end in HTTP response (Reading from remote peer failed: Connection reset by peer), state = 0
[Wed Jul 22 03:58:30 2020] [W] [pid 24179 (tid 139991673976576)] Failed parsing response: premature end in HTTP response (Reading from remote peer failed: Connection reset by peer).
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] initializing retry, closing socket
[Wed Jul 22 03:58:30 2020] [D] [pid 24179 (tid 139991673976576)] Creating new socket: website-domain.com.cn:443
[Wed Jul 22 03:58:31 2020] [D] [pid 24179 (tid 139991799801600)] Found farm website for website-domain.com
[Wed Jul 22 03:58:31 2020] [D] [pid 24179 (tid 139991799801600)] checking [/content/path-to-content/home.html]
[Wed Jul 22 03:58:31 2020] [D] [pid 24179 (tid 139991799801600)] cachefile does not exist: /app/aem/content/path-to-content/home.html
[Wed Jul 22 03:58:31 2020] [D] [pid 24179 (tid 139991799801600)] cache-action for [/content/path-to-content/home.html]: NONE
[Wed Jul 22 03:58:31 2020] [D] [pid 24179 (tid 139991799801600)] Creating new socket: website-domain.com.cn:443
Has anyone come across a similar setup? Can you please guide here what am I missing here/doing wrong?
Regards,
Preetpal
