简体   繁体   English

AWS 上的负载均衡器和容器

[英]Load balancer and Containers on AWS

I need feedback and advice.我需要反馈和建议。 I'm building a split platform on two different servers (one for the front end and the other for the backend).我正在两台不同的服务器上构建一个拆分平台(一个用于前端,另一个用于后端)。 The two parties communicate via API.双方通过 API 进行通信。

The problem: the frontend party makes a request to almost every user action in order to do tracking on event on the backend side.问题:前端方几乎向每个用户操作发出请求,以便跟踪后端的事件。 But the requests are high and the free tier ec2 instance can't keep up.但是请求很高,免费层 ec2 实例跟不上。 So I thought of implementing a load balancer on the ec2 instance that shares the load with the containers.所以我想在 ec2 实例上实现一个负载均衡器,与容器共享负载。

Is it possible to implement containers and load balancers using the free plan?是否可以使用免费计划实现容器和负载均衡器? Do you think it is a feasible solution and that it solves the problem?你认为这是一个可行的解决方案并且它解决了问题吗? Do you recommend any other solution?您是否推荐任何其他解决方案?

Free tier is not meant to be used for development of "heavy" applications.免费层并不意味着用于开发“重型”应用程序。 It is for you to basically learn core AWS services and do some small prototyping.基本上是让你学习核心 AWS 服务并做一些小型原型设计。

But if you consider ECS, only ECS EC2 launch type is covered by free tier, because you are only paying for instances (Fargate is not free).但是如果您考虑 ECS,则免费套餐仅涵盖ECS EC2 启动类型,因为您只需为实例付费(Fargate 不是免费的)。 If you want to use two t2.micro instances for your ECS tasks, the free tier will only cover about 15 days of their usage, ie 750 hours / 24 / 2 instance.如果您想为您的 ECS 任务使用两个 t2.micro 实例,免费套餐将仅涵盖大约 15 天的使用时间,即 750 小时 / 24 / 2 个实例。

So with or without a balancer, you are pretty much limited to one t2.micro per month.因此,无论有没有平衡器,您每月只能使用一个 t2.micro。 So you either should consider paying for the AWS services that your application is using, or make it "less-heavy" to work well on t2.micro.因此,您应该考虑为您的应用程序正在使用的 AWS 服务付费,或者使其“不那么繁重”以在 t2.micro 上运行良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM