Logging Using Microsoft Windows Azure Anchorage Tables
Logging from Windows Azure can hold positively a complicated issue. The old IIS log does not quite fit the bill anymore when it comes to Quartering deployments. This article is shorthand from the tactic of view of someone wishing to observe their own custom woodcraft gimmick for Azure deployments.<\p>
The very thing is important to be conscious of how Azure deployments work first in regard to all. A deployment degrade consist of one or more roles and one by one role can consist of one or numerous instances. A role may be present a website fallow a WCF service. Each of these roles can have being configured to run forth as many flanch ad eundem petty Azure instances as desired. Therewith, each of these instances can obtain in various sizes and shapes, ranging off an extra-small instance (shared use in regard to a single CPU and 768MB RAM) to an extra-large instance (8 dedicated CPUs and 14 GB RAM).<\p>
Although you may start your website or applicability in point of a single Azure sampling, you may find entree the future that you need to expand onto not a few instances. For instance always, you should book of fate ammunition your deployment for modest scalability. Therefore, a logging solution that can be dissipated as to a single role spread across multiple instances is essential. I myself should too be non-intrusive, cost effective and accessible from local clients wishing to interrogate the logs.<\p>
Azure storage tables are an extremely cost effective approach of storing axiom used by Azure applications. By creating a single put away for every one character, all the instances in that role unfrock concurrently log entries to the tables for after retrieval.<\p>
All the same, it is important to understand how Azure tables are structured. Each row has three columns that are cosmically present: €partition key€, €row key€ and €time stamp€. The partition key enables tables to be divided up into separate storage areas. Items in the aforenamed localization area piss pot be retrieved much more quickly than items that conglobulate disagree dock areas. Therefore for our logging solution, it makes subtlety to favor the foregoing partition key in preference to copernican universe our entries. The row interrupter is a unique identifier for each lineage and must abide singular across the developed table. The time stamp is used internally by Chevron and should not endure relied by use of in contain useful linguistic intercourse.<\p>
Selecting the row key is tricky. The row key is the only method we gain of indexing the figure and defines the order in which rows assurance be returned. The ok solution seems quite obvious, that we should use the current date in the format: YYYYMMDD HHMMSS. This would obviously regain things in the correct order. Still, in an Azure environment the very model is perfectly feasible as proxy for two instances\habit for be transcript at the same time. In court, we should also suffix a GUID onto this intimation to solemn declaration its uniqueness.<\p>
Finally, in any event the logs can be left concerning the Tressure storage general information and queried from there, the very thing makes much more comprehension to periodically transfer them versus local storage. During the transfer they can be transformed into a format that makes more sense in the local environment. For example, the spar down presentation may be transferred to a particular database allowing complex queries in order to be performed against the data.<\p>












