We have 3 public facing web applications which we are migrating to Azure. All sites use port 80.
OPTIONS
As far as I understand, there are three different options when using Web Roles:
1. All 3 sites hosted in ONE web role in a single cloud service:
ServiceDefinition.csdef
2. Each site hosted on a SEPARATE web role in a single cloud service:
ServiceDefinition.csdef
3. Each site hosted on a web roles in SEPARATE cloud services:
Is there anything else significant which I am missing?
POSSIBLE SOLULTION
A combination of option 1 and 2.
Hosting everything in one cloud service: Publishing them all together is fine since they all reference a common library project which would need to be updated consistently across all projects.
Hosting two sites in one web role: They can be scaled together fine.
Hosting the third site in it's own web role Will needs its own scaling because of massive peak demands.
ServiceDefinition.csdef
:
<ServiceDefinition name="WebTestCloudService.Test" xmlns="..." schemaVersion="2012-10.1.8">
<WebRole name="AzureWebTest1" vmsize="Small">
<Sites>
<Site name="AzureWebTest1">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="test1.mydomain.com" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
</WebRole>
<WebRole name="AzureWebTest2" vmsize="Small">
<Sites>
<Site name="AzureWebTest2">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="test2.mydomain.com" />
</Bindings>
</Site>
<Site name="AzureWebTest3" physicalDirectory="..AzureWebTest4">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="test3.mydomain.com" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
</WebRole>
</ServiceDefinition>
Please confirm that I am on the right track? Any input would be appreciated.
Sounds like you're on the right track. A few points of clarification:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With