1

I have this configuration that I use as a load balancer between two APIs (API_A & API_B).

<VirtualHost *:8080>

    # Cluster A
    ProxyPass "/services" "${API_A}/services" timeout=30
    ProxyPassReverse "/services" "${API_A}/services"

    # Cluster B (In the same PAAS)
    ProxyPass "/services" "${API_B}/services" retry=3 acquire=3000 timeout=5000 Keepalive=On
    ProxyPassReverse "/services" "${API_B}/services"

    # Configuration
    DocumentRoot "/opt/app-root/src/web"
    <Directory "/opt/app-root/src/web">
        AllowOverride FileInfo Indexes Options=Indexes,MultiViews
        Require all granted
    </Directory>

</VirtualHost>

API_A is deployed in a IAAS environnement. API_B is deployed in the same PAAS (Openshift) with this loadbalancer. Many calls fail with http code error 502 especially for API_B. For each failed call. I found these code errors in my logs.

AH01102: error reading status line from remote server API_B:80
AH00898: Error reading from remote server returned by /services/serviceB

I note that the API_B do not receive any http request when the call is failed (I am sure because I have a correlation ID for every request that I log in all the services) I have tried this configuration [retry=3 acquire=3000 timeout=5000 Keepalive=On]. I think it reduced the rate of failed calls (502 http errors) especially retry=3 but I still have errors. I don't understand why these calls fail and how can I fix this issue?

0 Answers0