Search code examples
amazon-web-servicesamazon-efs

How to calculate the data transfer rate of a particular site(virtual host) in AWS


I have virtual host files(sites) setup on two linux EC2 instances which are behind an ELB. I would like to know the data transfer rate of one particular site which is hosted on these EC2 instances. There are almost 30 virtual hosts on each EC2 instance and I need to calculate the average data transfer rate of all these sites. From cloudwatch I could only gather the information at service level but not for particular site. Is there any way to accomplish this?


Solution

  • In this case, I recommend 2 things:

    1. Do not use ELB or EC2 directly for data transfer.
    2. If you want to know the exactly MB/GB/TB:
      • Work with CloudFront in front of your ELB.
      • Register one CloudFront distribution for each site (domain, subdomain or whatever).

    If you do that, you will have more control and save money (data transfer) but it depends on the region (sometimes it can be a bit more expensive).