Consider the following deployment pattern which is common in on-promise Enterprise applications where the Presentation layer is deployed to a web farm and the rest of the layers are deployed to an Application farm with a database cluster serving the application. In larger enterprise applications, where common operation data stores are available, the data layer maybe separated into its own farm creating a typical n-tier environment.
There is a temptation to apply the same philosophy when we are thinking of deploying to the Cloud. The Windows Azure Platform provides roles where we can deploy our layers and it is common to envision our deployment topology to be somewhat like the following:
While this makes sense, there are several points that deserve our consideration:
- Worker roles in Azure behave like Windows Services and they employ an async pattern.
- Web roles and Worker roles communication are best done via Queues
- There is now an associated cost to the number of instances in our architecture.
Take note that services offered on Azure (at the time of this writing) is equivalent to renting a car. We can rent a car for a day and not drive it but we will still get billed. The similar concept applies to our provisioned services on Azure today.
Another cost factor that is often missed out during consideration is the cost for environments. Azure provides a staging and deployment environment and that effectively double the cost of our instances. Therefore the cost for our compute services for a single instance per role per month for the architecture above is:
(2 instances x 24 Hours x 30 Days) x (Staging + Production environment) = 2880 Compute Hours
and this calculation has not taken storage services charges into consideration yet.
By now, we should get the picture of how cost plays an important part in influencing Cloud application architectures. It is not to say that the above deployment strategy is discouraged. If the application is large enough to warrant such separation of code for fine tuning and distribution of load, the above strategy works fine.
In the next post, I will discuss how layering would look like in the Cloud.
No comments:
Post a Comment