So I want to test my cloud application and how it will react if I scale my application out.
So by default we run one instance of the service, so if I wish to I can test the number of instances in my development fabric, so I don't get nasty surprises.
To do this all I need to do is modify my Service Configuration file.
ServiceConfiguration.cscfg
To spin up more instances all i need to do is modify the Instances element's count attribute to the number of instances I require.
So in the config below, I have configured the number of instances I am using to 3.
<?xml version="1.0"?>
<ServiceConfiguration serviceName="HelloWorldWeb" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
<Role name="WebRole">
<Instances count="3"/>
<ConfigurationSettings>
</ConfigurationSettings>
</Role>
</ServiceConfiguration>
The really cool thing is that can see (and debug) the multiple instances in my development fragment (and look at the logging).
I've pasted a screenshot below:
No comments:
Post a Comment