AWS负载均衡器每个数据包 – 仅使用iptables?

huangapple go评论108阅读模式
英文:

AWS loadbalancer per packet - only iptables?

问题

需要设计建议。需要在AWS负载均衡器上按数据包而不是按流来运行。
这是为了单向基于UDP的流媒体。
这意味着负载均衡器接收的每个数据包都应该被发送到另一个目标,以便所有目标接收相同数量的数据包。

我没有看到任何现成的解决方案,考虑使用带有iptables和"-m statistic --mode random" PREROUTING链的EC2。对于1到10Gbit/s规模,对该模块的性能有何评论?(我需要多强大的EC2实例?)

是否有其他建议/提示如何实现这一目标?

谢谢。

英文:

Need a design advice. Need to run in AWS loadbalancer per packet (not per flow).
It's for unidirectional UDP based streaming.
That means that each packet received by the loadbalancer should be send to another target - so that all targets receive the same amount of packets.

I do not see any ready solution and considering using EC2 with iptables and "-m statistic --mode random" PREROUTING chain. Any comments on the performance of that module at 1 up to 10Gbit/s scale ? (how strong EC2 instance would i need?)

Any other advices / hints how to achieve it ?

Thanks,

答案1

得分: 2

AWS网络负载均衡器可以配置为将流量发送到"随机"的目标(Targets)在目标组(TargetGroup)中,但这种行为没有文档记录,只是简单说明了(确切地说,没有定义分发是如何完成的)。这是通常ELB行为,目标是由一些隐藏的算法选择的。也许值得尝试一下?请确保关闭粘性(Stickiness),因为启用它会与您的使用案例完全相反。

我无法找到关于NLB将支持多少GBit/s的明确定义。但有LCU(负载均衡器容量单位)的概念,它还确定计费,并需要考虑在内。LCU在CloudWatch中公开显示。

自定义的EC2实例将可以工作,但随着网络规模的增加,成本也会增加(大致)。这里是一般的EC2实例列表,您可以根据您的网络需求进行筛选,还可以查看其定价。

也许您应该一般选择具有增强网络和Nitro的设备,因为后者具有用于快速网络的特殊硬件。

英文:

AWS Network Loadbalancer can be configured to send to "random" Targets in the TargetGroup, but this behaviour is not documented and just stated (to be exact, it's not defined how this distribution is done). It's the general ELB behaviour that targets are chosen by some hidden algorithm. Maybe it's worth an experiment? Make sure that Stickiness is turned off, as this is enabled the exact opposite of your use case.

I couldn't find a hard definition of how many GBit/s a NLB will support. But there is the concept of LCU (Load Balancer Capacity Units) that determines also billing and needs to be taken into account. LCUs are exposed in CloudWatch

Custom EC2 Instances will work and also cost a lot as CPU scales (roughly) with network. Here is a general list of EC2 Instances that you can filter for your network requirements and also see the pricing for it.

Maybe you should generally go for Devices with Enhanced Networking and Nitro, as later have special hardware for fast networking.

huangapple
  • 本文由 发表于 2023年2月19日 15:12:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/75498542.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定