- Create different backends for different service ports
- Create host and path rules for mapping domains to backends
- Create the frontend (proxy) to receive requests
- Notes:
- Client -> Proxy -> Host/path rules -> Backend:Port
- Use SSL/TLS cert on frontend, not necessary elsewhere
- Pros:
- Multiple healthchecks for multiple services
- Cons:
- No advanced config on proxy
Solution 2: Use Google Balancer + Nginx for advanced mapping domains to service ports:
- Create a single backend to Nginx at port 80
- No need host/path rules
- Create frontend (proxy) to receive requests
- Config Nginx on all instances to add custom configurations, e.g. HTTP Upgrade for socket.io, etc.
- Notes:
- Client -> Frontend (Proxy) -> Skip:Host/path rules --> Nginx --> Service:Port
- Use SSL/TLS cert on frontend, not necessary elsewhere.
- Pros:
- Advanced config on Nginx proxy
- Cons:
- Only a single healthcheck, when deploying services on an instance, shutting down Nginx is required to notify the healthcheck; all services on this instance is down at the same time. When all services on this instance are up back, turn on Nginx to notify healthcheck again.
No comments:
Post a Comment