separate the tier and add load balancer haproxy code