I plan to host a GitLab instance on AWS. My only problem is the frontend loadbalancer.
For git work we need HTTPS and SSH, both using the same host name.
- The Application Load Balancer (ALB) supports HTTPS termination with ACM certificates (which we need) but no TCP forwarding for SSH.
- The Network Load Balancer (NLB) supports TCP forwarding, but it isn't a good choice for HTTPS.
- There is the option of using the Classic Load Balancer, since it supports HTTP, HTTPS and TCP listeners, but should I really use that in 2021? And it also does not support HTTP/2 (would be a nice to have)
I also thought about cascading an ALB behind an NLB: Network Load Balancer listens to TCP 22, 80 and 443, forwarding 22 to GitLab and the other two to an ALB which does the HTTPS termination (and the HTTP to HTTPS redirect) But that would require a complicated setup with a Lambda to update the ALB's IPs in the NLB's Target Groups, as described here: https://aws.amazon.com/blogs/networking-and-content-delivery/using-static-ip-addresses-for-application-load-balancers/
Is there an elegant solution or do I have to use a Classic Loadbalancer?