Cross browser testing with CDN for millions screenshots

Just wanted to share with you our challenge and how we resolved it. We are doing Cross browser testing SaaS . We support both repeating user flow and taking screenshots functionality on multiple browsers, devices, screens. One of the challenges we had was how can we give fastest access to people for the screenshots we generate. A sample - if I run a test with 20 steps on 10 browsers this is 200 steps with totally 500-700 MB screenshots. They are usually accessed once or twice…or never. We explored various options like:

  1. Can we serve these from our site directly?
  2. Can we serve them from Amazon S3 or something else?
  3. Can we use CDN?

It turned out that if we serve these from one location in Amazon S3 then access is extremely slow 2-3 seconds for thumbnail and 6-10 seconds for larger screenshot if the user is outside USA. This was make it or break it. Serving it from CDN was not an option for dynamic content. It is good for 1,000 files accessed 100,000 times each but did not work for a million of screenshots accessed just once…

After chasing various hosting/cloud/storage providers we found that the Google cloud solution was practically doing real-time CDN for anything you upload on their storage. That way we upload it once and seconds later it is distributed to the user from the best location for him.

The final result?? Initial loading time of 2-3 seconds for thumbnail and 6-10 seconds for screenshot went down to 200-300 ms for thumbnail and 500-600 ms for screenshot. Kudos to Google and luckily for us it works like a charm.