WebPagetest Forums
Using EC2 reserved instances for test agents - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Using EC2 reserved instances for test agents (/showthread.php?tid=13362)



Using EC2 reserved instances for test agents - kevinrdixon - 11-11-2014 10:10 PM

Using the ready-made WPT AMI (https://github.com/WPO-Foundation/webpagetest/blob/master/docs/EC2/Server%20AMI.md), is there a way to use EC2 reserved instances for test agents? With a lot of testing to do this is likely to be more economic (and get results quicker) spinning up on-demand EC2 instances.

I guess if there was a means to spin up a reserved instance so that WPT server recognised it and then disable the termination of agents that would do the trick...


RE: Using EC2 reserved instances for test agents - pmeenan - 11-11-2014 11:28 PM

Not yet but the server image support is still pretty new so it's good to know the use case. I was planning a few things that would help:

- Allow for specifying the default location through user data
- Have a setting that always keeps a minimum of X test agents for the default location (or possibly a way to specify a minimum and maximum number for every location)

As far as I can tell, there's no special API for separating on-demand and reserved instances. I assume spinning up on-demand instances of a given size will pull from your reserved instances first and then go into regular on-demand (unless you were using reserved instances to refer to always running rather than Amazon's special pricing).

It might also be worthwhile to see about custom schedules where a hot spare is kept around during the week during the day but shut down over night or on weekends though figuring out how to expose that as a config is going to be a bit of a challenge.


RE: Using EC2 reserved instances for test agents - kevinrdixon - 11-13-2014 02:16 AM

Your suggestions for setting default location and keeping a min of test agents running look good to me.

Of course, you are right about reserved instances - its a question of pricing, no more.
With that in mind, if it was possible to set a min number of 'agents, my use case would be fulfilled.

Custom schedules would be nice, but perhaps not essential (since you could probably achieve the same thing with external tools/scripts to spin up/down). As to config, wouldn't a CRON-like syntax do the job?


RE: Using EC2 reserved instances for test agents - pmeenan - 11-14-2014 05:32 AM

Cron syntax is good for when to kick off an event but it's not great for blocking off durations in time. (M-F 8-5 for example).