AWS load balancer and maintenance page

后端 未结 4 1705
隐瞒了意图╮
隐瞒了意图╮ 2021-02-07 06:21

I\'m using AWS Load Balancer with 3 EC2 servers, and I\'m trying to serve a Maintenance page when site is under maintenance.

This page need to return 503 HTTP code, bec

4条回答
  •  走了就别回头了
    2021-02-07 06:49

    You could implement an additional route in your app server, let's say /hcm (for health check maintenance), that always responds 200 OK. When it's time for maintenance, you programmatically modify the ELB health check to use the /hcm target which returns 200 OK rather than / or /index.html, which both return 503 Service Unavailable. Revert these changes when exiting maintenance.

提交回复
热议问题