Search code examples
amazon-web-servicesamazon-cloudfrontload-testingcdn

Is Load testing with Cloudfront (CDN) is a good approach?


I have an application that needs to handle huge traffic. The previous version of the application hits nearly 2,000,000 requests in 15 mins. That version does not have a CDN so that I need to deploy nearly 50 containers each for frontend and backend. So now I have added a CDN in front of my application. I have chosen AWS Cloudfront as CDN because the application is hosted on AWS.

Right now, I need to do the load test for this new application. If I do the load test with the Cloudfront URL, will it show the exact result as it will be served by Cloudfront?

If I load test with the Load Balancer URL and find out the required number of servers for handling the required load, will that be an over provision? As the Cloudfront will serve my application from nearly 189 edge locations (from AWS docs), is that much servers are required?

How can I find a relation between the amount of traffic that can be handled with and without Cloudfront?


Solution

  • Load testing Cloudfront itself is not the best idea, according to Cloudfront main page

    The Amazon CloudFront content delivery network (CDN) is massively scaled and globally distributed.

    However you could test the performance of your website with and without the CDN to see if there is a benefit/ROI of using Cloudfront as it doesn't come for free and you need to ensure that it makes sense to use it as it might be the case your application performance will be sufficient without the CDN integration.

    Check out 6 CDN Load Testing Best Practices for more details.

    Also make sure to add DNS Cache Manager to your test plan to ensure that each JMeter thread (virtual user) independently resolves the underlying server address for the ELB as it might be the case all the threads will be hitting the same IP address.