Geeks With Blogs

News This is the *old* blog. The new one is at blog.sixeyed.com
Elton Stoneman
This is the *old* blog. The new one is at blog.sixeyed.com

I’ve written before about cloud performance testing tools and how good they are - in fact they rank highly in my Five Essential Tools for Building REST APIs.

Both loader.io and blitz.io use a similar mechanism to ensure that you own the domain you're about to load test. They generate a unique ID and ask you to put that in the root of your domain. Before any tests execute, they check that the file exists with the right content. It's a simple way of stopping people using the load test service to DDoS someone else's domain...

Usually putting the file in the root path of your website or API is easy enough, but with loader.io they generate a new verification ID for every domain - which gets awkward if you have multiple environments, and even worse if you have multiple deployment slots for those environments, each of which has a different domain.

To avoid having to add a new verification file for every environment, and then rebuild and redeploy your solution whenever you have a new environment, you can out all your verification files in an Azure blob storage container, and redirect requests to them using URL rewrite rules. For loader, this is how the rewrite section in web.config looks:

<system.webServer>
    <rewrite>
        <rules>
            <rule name="loader">
                <match url=\"^loaderio-(.*).txt\" />
                    <action type="Redirect" url=\"http://mystorage.blob.core.windows.net/loader-tokens/{R:1}\" />
            </rule> 
        </rules>
     </rewrite>
</system.webServer>

When you have a new environment to deploy to, or a new deployment slot, just generate the verification file in loader or blitz, and upload it to the storage container. When the load test engine checks for the file, it will be redirected to the blob which has the right content, and your test will run happily.

Posted on Friday, May 29, 2015 12:12 PM Scripting & Automation | Back to top


Comments on this post: Put your load test verification files in Azure Blob Storage

# re: Put your load test verification files in Azure Blob Storage
Requesting Gravatar...
This heart themed tie features an allover repeat design of brilliant red hearts on a black background.
192.168.l.l
Left by kground on Jul 29, 2016 9:00 AM

Your comment:
 (will show your gravatar)


Copyright © Elton Stoneman | Powered by: GeeksWithBlogs.net