# Running MYSQL and Web Server load balancing 503 Error

**URL:** <https://discourse.haproxy.org/t/running-mysql-and-web-server-load-balancing-503-error/3610>\
**Category:** Help!\
**Created:** [March 12, 2019, 5:38pm UTC](https://discourse.haproxy.org/t/running-mysql-and-web-server-load-balancing-503-error/3610 "2019-03-12T17:38:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael1234](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@michael1234](https://discourse.haproxy.org/u/michael1234)\
**Post date:** [March 12, 2019, 5:38pm UTC](https://discourse.haproxy.org/t/running-mysql-and-web-server-load-balancing-503-error/3610/1 "2019-03-12T17:38:49Z")

</div>

Hi,  
Hope somebody can help I have run out of idea’s ☹

Is it possible to run mysql cluster load balancing and https load load balancing on the same instance of haproxy ?

I have the following setup but I receive 10 minutes delay on the application when one of the mysql servers is shutdown I receive 503 error . If I manually restart the haproxy service the application comes back online

Cluster Application ( 2 Nodes )  
MYSQL Cluster (2 Nodes )  
Keepalive Virtual IP

The application connects to the virtual IP for the database cluster and application

I think I have configured the haproxy frontend or backend incorrectly  
Any help would be much appreciated

**Config**

frontend http\_front  
mode http  
bind \*:80  
bind \*:443 ssl crt /etc/ssl/certs/mycert.pem  
stats uri /haproxy?stats  
default\_backend http\_back

backend http\_back  
mode http  
balance roundrobin  
cookie JSESSIONID prefix nocache  
option forwardfor  
option httpchk HEAD / HTTP/1.1\r\nHost:localhost  
server FQDN 10.40.3.170:8080 cookie App1 check  
server FQDN10.40.3.171:8080 cookie App2 check  
http-request set-header X-Forwarded-Port %[dst\_port]  
http-request add-header X-Forwarded-Proto https if { ssl\_fc }

---

<div class="post-metadata">

**Author:** ![ssbostan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/ssbostan/32/804_2.png) [@ssbostan](https://discourse.haproxy.org/u/ssbostan)\
**Post date:** [March 12, 2019, 6:52pm UTC](https://discourse.haproxy.org/t/running-mysql-and-web-server-load-balancing-503-error/3610/2 "2019-03-12T18:52:08Z")

</div>

You need to setup Galera Cluster for MySQL and making local connection from your web application.
