Performance test in AWS : How to guarantee Bandwidth

ぐ巨炮叔叔 提交于 2020-06-16 17:31:20

问题


I need to run a performance test against an application based on Elastic Beanstalk located in AWS fronted by and ELB. I expect traffic to be around 25 Gbit/s

As per AWS requirements, I am using another account (dedicated to tests) from my AWS organisation. The application is a production application in another account of my AWS organisation.

My performance test will use the DNS entry of the production website, it will be executed by EC2 instances in subnet of a VPC that has an internet gateway.

I have a doubt regarding the bandwidth, I don't understand from AWS documentations I read if there will be a limitation of bandwidth or not ?

From this answer it seems I may face such issues:

  • https://stackoverflow.com/a/62344703/9565222

In this case, how can I run a performance test that reflects what happens in production, ie pass through DNS entry pointing to the ELB.

Let's say I create a Peering connection between the Test account VPC and production VPC, what is the max bandwidth ?

My test shows that with 3 c5d.9xlarge using a VPC Peering connection , I only get around 10 Gbits/s, so it would be the max whatever the number of instances.

Another test shows that with 3 c5d.9xlarge using a Internet Gateway, I get varying bandwidth capped around 12 Gbits/s, but I cannot tell what's the real limit.

So what are my option ? - VPC Peering is not - Internet Gateway from multiple machines may be but I would like a kind of guarantee - Are there better options (Transit Gateway ?) ?


回答1:


I need to run a performance test against an application based on Elastic Beanstalk located in AWS fronted by and ELB. I expect traffic to be around 25 Gbit/s

That sounds totally fine, ELB can easily handle 25 Gbps.

Make sure that your test reflects what your production load is going to be like. If your production load is all coming from a very small number of sources, replicate that. If it's coming from a very large number of sources (e.g., lots of users of a client app, each generating a bit of traffic, resulting in a ton of total aggregated traffic), make sure you replicate that. There are differences that may seem nuanced if you're not experienced in this kind of testing, and reproducing the real environment as closely as possible is the easiest way to avoid any of those issues.

For testing with a very large number of relatively low-bandwidth sources, take a look at projects like these:

  • Bees with Machine Guns
  • Tsung

I have a doubt regarding the bandwidth, I don't understand from AWS documentations I read if there will be a limitation of bandwidth or not ?

Some components in AWS have bandwidth limitations, some don't.

Specifically, EC2 instances each have a maximum bandwidth they support depending on the instance type. Also, you should know that even if a given EC2 Instance Type supports a certain bandwidth, you need to be sure that the OS running on that instance supports that bandwidth. This usually means that you need to ensure that the correct drivers are being used. In my experience, as long as you use the most recent version of Amazon Linux avaialable, everything should "just work".

Also, as I mention in more details later, VPC Peering Connections and Internet Gateway are do not limit bandwidth.

Let's say I create a Peering connection between the Test account VPC and production VPC, what is the max bandwidth ?

VPC Peering Connections are not a bandwidth bottleneck. That is, they don't limit the amount of bandwidth you have across the peering connection.

From the Amazon VPC FAQ:

    Q. Are there any bandwidth limitations for peering connections?

    Bandwidth between instances in peered VPCs is no different than bandwidth between instances in the same VPC.

[nb: there's a note about placement groups in the FAQs, but you don't mentioned that so I removed it; if you are using the feature, please clarify, as it's something that you most likely shouldn't be using anyway based on what you described originally in the question]

My test shows that with 3 c5d.9xlarge using a VPC Peering connection , I only get around 10 Gbits/s

The c5d.9xlarge instance type is limited to 10 Gbps. So if you use that for your test, you won't ever see one instance with more than 10 Gbps.

More info here: Amazon EC2 C5 Instances.

Also, make sure you check the EC2 C6g instances. I haven't personally used them, but they are supposed to be incredibly faster and lower cost: they were released just 2 days ago.

Another test shows that with 3 c5d.9xlarge using a Internet Gateway, I get varying bandwidth capped around 12 Gbits/s [...]

The Internet Gateway isn't a bandwidth bottleneck. In other words, there's no bandwidth limit imposed by the Internet Gateway.

In fact, there's no "single device" that is an Internet Gateway. Think of it more as a "flag" that tells the VPC networking system that your VPC has a path to and from the Internet.

From the Amazon VPC FAQ:

    Q. Are there any bandwidth limitations for Internet gateways? Do I need to be concerned about its availability? Can it be a single point of failure?

    No. An Internet gateway is horizontally-scaled, redundant, and highly available. It imposes no bandwidth constraints.

So what are my option ? - VPC Peering is not - Internet Gateway from multiple machines may be but I would like a kind of guarantee - Are there better options (Transit Gateway ?) ?

VPC Peering is probably the best choice here. As I mentioned, it is not limiting your bandwidth. Check other things like I mentioned before: the instance type, the OS, the drivers, etc.

Using an Internet Gateway for this implies that, from a routing perspective, your traffic is "leaving AWS" and going "out to the Internet" (even though, physically, it probably won't ever truly leave AWS's physical devices). This means that, from a billing perspective, you'll be charged "Data Transfer Out to the Internet" rates. They are significantly higher than what you'd pay for VPC Peering.

I see no need for a Transit Gateway here, as the scenario you describe is really simple and can be solved with a VPC Peering Connection.



来源:https://stackoverflow.com/questions/62364454/performance-test-in-aws-how-to-guarantee-bandwidth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!