大网数据广告活动
服务器运维问答

What application structure for Load Balancing HTTPS/Websockets with many domains on AWS with Docker

· 52CE 我爱测

We are having an application that heavily relies on websockets. As our Application is software-as-a-service, our clients can use their own domains (and forward them via CNAME to our servers). At the moment, we use a reverse proxy…

问题原文

原帖链接 · Tobi · CC BY-SA 4.0

We are having an application that heavily relies on websockets. As our Application is software-as-a-service, our clients can use their own domains (and forward them via CNAME to our servers). At the moment, we use a reverse proxy to balance the incoming traffice between multiple fixed-ip backend servers.

We now want to migrate our architecture to docker, supporting dynamic up- and downscaling, so our current reverse proxy isn't vaiable anymore ad it cannot automatically find the backend services in our AWS ECS Docker Cluster.

The Intended Infrastructure Looks something like:

                             +-> Docker Container 1
 Clients --> Load Balancer --+-> ...
                             +-> Docker Container n

However, we have multiple restraints:

  • We need to support the ACME Protocol for getting Let's Encrypt or AWS ACM SSL Certificates
  • We need to have sticky connections for the websockets (until one node goes down)
  • The Connection between the Load Balancer and the Backend Servers needs to be encrypted
  • each of our customers is having an own domain, so we need to support incoming HTTPS-Connections for several hundred different domains.
  • multiple different domains may not share one ssl-certificate to prevent lookups of our customer base
  • the load balancer needs to find new containers from the same service

any suggestions what Load Balancer is viable for us?

Edit: The Application Load Balancer is not Vaiable for our use as they have a limit of 25 Certificates at the moment

已采纳解答

原帖链接 · MLu · CC BY-SA 4.0

Looks like Application Load Balancer is your best bet.

We need to support the ACME Protocol for getting Let's Encrypt or AWS ACM SSL Certificates

AWS ACM is definitely an easier option with ELB/ALB.

We need to have sticky connections for the websockets (until one node goes down)

Tick.

The Connection between the Load Balancer and the Backend Servers needs to be encrypted

Tick. You can have self-signed certs on your containers, ALB will be happy with that.

Each of our customers is having an own domain, so we need to support incoming HTTPS-Connections for several hundred different domains.

Tick.

Multiple different domains may not share one ssl-certificate to prevent lookups of our customer base

There is a limit of 25 certs per ALB - I guess it can be increased through a support ticket. Even if not you can set up multiple ALBs, perhaps in different regions for different customer subsets.

The load balancer needs to find new containers from the same service.

That will be part of your container deployment.

Look at AWS ECS (Elastic Container Service), AWS Fargate (serverless container platform) and AWS EKS (Elastic Kubernetes Service). These are all different ways to run docker containers on AWS, each has it pros, cons and different pricing. And they all work seamlessly with Application Load Balancers.

Alternatively look at Network Load Balancer but then you’ll have to deal with SSL termination in the containers, including distribution and rotation of SSL certs (that can be done through shared storage like S3 or EFS).

Hope that helps :)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-10-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。