Multi-server install (High Availability)


Not sure if anyone tried this or not before. I am looking for the fastest path to support high availability for a self-hosted WPT on AWS.

Ideally, it will be great to be able to spawn two WPT servers in different AZs and front them with ELB.

It seems this is not supported easily since the servers have their own test results store and not using a shared one. If a client asks for a particular test result, it might have a miss in case the request goes to the wrong backend server. Clients will be API consumers and web browsers. Session stickiness help in the latter but not the former.

I can see that there is a serverID setting but this seems to influence only the test ID value generation.


The test ID generation ensures the ID’s are unique across servers so they can use the same backing store for results. It only works for the archived store (and they archive immediately) so any server can display results from any other server but the process of actually running the tests still needs to go through specific servers.

btw, I have thought about how to make it truly HA with SQS or pub/sub instead of beanstalkd for the queues and result processing but none of it got plumbed and it will probably be a reasonable amount of work.

Thanks Pat for the quick response.

For immediate S3 archiving over HTTPS and also test results can be retrieved from any server, would you please confirm below settings to achieve that? And is there any way to rely on IAM role attached to the EC2 to upload to S3 instead of injecting the access & secret keys?

;Number of days to keep tests locally before archiving

;Run archive script hourly automatically as agents poll for work

This will be great addition to the WPT, thanks for your efforts!

As long as “lasyArchive” isn’t set in settings.ini the tests will be uploaded to S3 as soon as they complete, independently of the archive setting:

The archive setting really just controls how long the tests are kept on the local drive as well. In principle, the test should be readable from any server within a few seconds of it completing.

Would you please confirm below settings are the only required ones for S3 archiving? For some reason, we don’t see the test results in the S3 bucket even though the AWS key have the proper permissions and confirmed that by running aws s3 cp command and setting the keys on the WPT server.