Score:0

Specify URL instead of IP:port in network endpoints for applications behind reverse proxy

mv flag

We are using GCP external HTTPS load balancer, architecture is shown in the diagram below. The primary use of LB is redirecting users to static error site (hosted on Cloud Storage bucket) in case CE instance is down, Traefik crashes on CE, Docker crashes on CE, etc.

We have 4 backend services defined on load balancer:

  1. static-error-page backend bucket
  2. blog-backend-service, gallery-backend-service and shop-backend-service zonal network endpoint groups

Then, we defined host and path rules so that:

  1. https://blog.company.com -> blog-backend-service
  2. https://gallery.company.com -> gallery-backend-service
  3. https://shop.company.com -> shop-backend-service
  4. All unmatched (default) -> static-error-page

Each zonal network endpoint group (blog-backend-service, gallery-backend-service and shop-backend-service) has just 1 endpoint defined: 192.168.171:443 (192.168.171.3 is internal IP of CE instance).

However, since my websites are served behind reverse proxy (Traefik), specifying IP:port combination in network endpoint is useless because they all have the same IP:port. I would like to specify URL instead of IP:port in network endpoint (that way network endpoint would also show correct health status if website is down, it always reports healthy now, even if application is down).

Is it possible to specify URL instead of IP:port in network endpoint? If not, what are my alternatives?

(click on the image to enlarge it) architecture

Abhijith Chitrapu avatar
tr flag
You can try the option of [Migrating](https://cloud.google.com/traffic-director/tutorials/set-up-internet-neg#migrate-to-internet-neg) from an IP:Port NEG to an FQDN:Port NEG
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.