0% found this document useful (0 votes)
3 views

D306 MaterNotes

The document provides key terms and definitions related to Azure services, including Azure CLI, Cosmos DB, and Blob Storage, emphasizing their functionalities and importance in cloud computing. It covers concepts like PartitionKey, consistency levels, and access tiers, along with practical code snippets for creating resources and managing data. Additionally, it discusses strategies for optimizing performance and cost-efficiency in Azure storage solutions.

Uploaded by

Eric Isberg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

D306 MaterNotes

The document provides key terms and definitions related to Azure services, including Azure CLI, Cosmos DB, and Blob Storage, emphasizing their functionalities and importance in cloud computing. It covers concepts like PartitionKey, consistency levels, and access tiers, along with practical code snippets for creating resources and managing data. Additionally, it discusses strategies for optimizing performance and cost-efficiency in Azure storage solutions.

Uploaded by

Eric Isberg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Chapter 1

Key Terms and Definitions

Azure Command-Line Interface (CLI): A set of commands used to create and manage Azure
resources. It is available across Azure services and emphasizes automation.

Azure Container Registry (ACR): A registry of Docker and Open Container Initiative (OCI)
images, supporting all OCI artifacts.

Azure Resource Manager (ARM): The native platform for infrastructure as code (IaC) in
Azure, centralizing the management, deployment, and security of Azure resources.

Infrastructure as a Service (IaaS): A highly automated offering where computing resources,


storage, and networking capabilities are provided on demand, scalable, and elastic in real-time.

Network Interface Card (NIC): A hardware component that connects a computer to a network.

Remote Desktop Protocol (RDP): A proprietary protocol developed by Microsoft providing a


graphical interface to connect to another computer over a network.

Secure Shell Protocol (SSH): A cryptographic network protocol for secure network services
over an unsecured network, notable for remote log-in and command-line execution.

Transmission Control Protocol (TCP): A main protocol of the Internet Protocol (IP) suite,
connection-oriented, establishing connections before data transfer.

Virtual Machine (VM): A software-based compute resource running programs and deploying
apps, operating independently on a physical host machine.

Application Programming Interface (API): Definitions and protocols for building and
integrating application software, enabling communication between applications.

Continuous Integration (CI) and Continuous Delivery/Deployment (CD): Practices in


software engineering enforcing automation in building, testing, and deployment of applications,
bridging gaps between development and operations.

Hypertext Preprocessor (PHP): A scripting language for developing dynamic websites,


embedded in HTML for added functionality without external data calls.

Input/Output Operations Per Second (IOPS): A performance measurement for computer


storage devices like HDDs, SSDs, and storage area networks.

Platform as a Service (PaaS): Cloud computing services allowing provisioning, running, and
managing computing platforms and applications without infrastructure complexity.
Software Development Kit (SDK): A collection of development tools in one package,
facilitating application creation with compilers, debuggers, and frameworks.

File Transfer Protocol (FTP): A standard protocol for transferring files from a server to a client
on a network.

Hypertext Transfer Protocol (HTTP): An application-layer protocol for transmitting


hypermedia documents like HTML, used for communication between web browsers and servers.

Integrated Development Environment (IDE): Software providing comprehensive facilities for


software development, including a source code editor, build automation tools, and a debugger.

JavaScript Object Notation (JSON): A human-readable file format for data interchange, used
for serializing structured data and exchanging it over a network.

Virtual Private Network (VPN): Extends a private network across a public network, enabling
secure data transmission as if devices were directly connected to the private network.

Yet Another Markup Language (YAML): A human-readable data-serialization language for


configuration files and applications storing or transmitting data.

Request Unit (RU): The unit expressing the cost of database operations in Azure Cosmos DB.

Structured Query Language (SQL): The standard language for relational database
management systems, used for updating and retrieving database data.

Time To Live (TTL): The lifespan of a packet in a network before being discarded by a router.

Microsoft Developer Network (MSDN): Sites for the developer community providing
information, documentation, and discussion authored by Microsoft and the community.

Service-Level Agreement (SLA): An agreement setting expectations between a service provider


and the customer, describing delivered products or services.

Internet of Things (IoT): A system of interrelated internet-connected objects collecting and


transferring data over a wireless network without human intervention.

JSON Web Token (JWT): An open standard for sharing security information between a client
and server.

Microsoft Authentication Library (MSAL): Provides secure access to Microsoft Graph,


Microsoft APIs, third-party web APIs, or custom web APIs.

Role-Based Access Controls (RBAC): Fine-grained access control method for Azure
subscription resources.
Shared Access Signatures (SAS): A URI for narrowing access to specific containers inside a
storage account.

Azure Active Directory (Azure AD): Microsoft's cloud-based identity and access management
service.

Azure Instance Metadata Service (IMDS): Service for requesting an OAuth access token from
applications within the VM using managed identities.

Perfect Forward Secrecy (PFS): Encryption system protecting connections with unique keys,
not a protocol.

Azure CDN Profile: Contains endpoints in an application included in the CDN, configuring
content delivery behavior.

Content Delivery Network (CDN): Geographically distributed servers providing fast internet
content delivery closer to users.

Dynamic Content: Content changing based on user interaction, such as dashboards with graphs.

Redis: Open-source cache system functioning as an in-memory data structure store, database
cache, or message broker.

Static Content: Unchanging content for all users, such as images and PDFs.

Telemetry: Diagnostic data monitoring the performance of critical operations.

Transaction: Group of commands completing or failing together.

Transient Faults: Temporary network connectivity loss, service unavailability, or timeouts due
to busy services.

Action: Each step configured in a workflow.

Workflow: Process defining steps or actions for delivering information from the source to the
destination.

Azure API Management (APIM): Service creating an enterprise-grade API for existing back-
end services.

Policy: Mechanism for changing default APIM gateway behavior.

Consumer Groups: View connecting event receiver applications to an event hub using AMQP
protocol.

Event Publisher: Entity sending events to the Event Hub.


Pub/Sub: Publication and subscription application for asynchronous service communication.

Message: Raw data produced by a service for storage or processing elsewhere.

Queue: Container for messages.

Topic: Filter for sending and receiving messages.

Chapter Summary

Azure offers computing services to deploy virtualized infrastructure in the cloud and hybrid
architectures connecting on-premises infrastructure with IaaS resources. The Azure Resource
Manager (ARM) manages cloud resources using JSON-based ARM templates.

A container image packages software with code and dependencies for a highly portable
environment. Instances of container images are called containers, stored in registries like Azure
Container Registry.

Azure provides serverless solutions, focusing on code without managing infrastructure. Azure
App Services, the foundation of serverless offerings, include web apps, mobile back-end apps,
REST APIs, Azure Functions, and Azure Durable Functions. App Services are billed for
runtime, operating on App Service Plans with shared resources.

Diagnostics logging in App Services includes webserver logging, detailed error, failed requests,
application diagnostics, and deployment diagnostics, stored locally on the VM.

Scaling in App Services involves horizontal scaling (adding/removing instances) and vertical
scaling (adding/removing VM resources). Autoscale rules manage resource allocation, dependent
on Azure VM scale sets.

Azure Functions, an evolution of WebJobs, use triggers and bindings for function instances,
supporting .NET Framework and .NET Core. Durable Functions extend Azure Functions,
preserving instance states in workflows, with orchestration, activity, and client functions. Azure
Function Apps provide resources for running these functions.

Thought Experiment and Answers

Scenario: Developing an application integrating multiple systems, including a legacy system


generating report files uploaded to Azure Storage. The application reads these files and inserts
data into destination systems.

Questions:

1. Approval Workflow: Which Azure service initiates an approval workflow for new
report files in Azure Storage?
2. Performance Issues: How to ensure the application doesn't suffer performance issues
during usage peaks?

Answers:

1. Approval Workflow: Use Azure Durable Functions with a Human Interaction pattern,
starting with Azure Blob Storage triggers.
2. Performance Issues: Deploy Azure Durable Functions to Azure App Service Plans with
autoscale rules based on CPU consumption or specific days, after studying usage
patterns.

Key Code Snippets:

 Provisioning a VM:

powershell
Copy code
New-AzVM -ResourceGroupName "ResourceGroup" -Name "VMName" -Image
"ImageName" -Location "Location"

 Creating an Azure App Service web app:

powershell
Copy code
New-AzWebApp -ResourceGroupName "ResourceGroup" -Name "AppName" -
Location "Location" -AppServicePlan "AppServicePlan"

 Creating Azure Functions:

powershell
Copy code
func init MyFunctionProj --worker-runtime dotnet
func new --name MyHttpTrigger --template "HTTP trigger"

This condensed summary and key points should aid in preparing for exams and understanding
core concepts.
Chapter 2
Section 2.1: Develop Solutions That Use Cosmos DB Storage

Key Terms and Definitions

 Cosmos DB: A globally distributed, multi-model database service that provides low-
latency access to data.
 PartitionKey: Defines the logical partition where the entity is stored in Cosmos DB.
Choosing the correct PartitionKey is crucial for performance.
 API for Cosmos DB: Cosmos DB supports various APIs, including SQL, Table, Gremlin
(Graph), MongoDB, and Cassandra.
 Logical Partition: Each logical partition can store up to 20 GB of data.
 Consistency Levels: There are five consistency levels in Cosmos DB:
o Strong: Offers the highest level of consistency with higher latency.
o Bounded Staleness: Guarantees consistency within a specified time window.
o Session: Consistency is guaranteed within a single session.
o Consistent Prefix: Ensures that reads never see out-of-order writes.
o Eventual: Offers the lowest consistency with the lowest latency.

Important Points

 PartitionKey Importance: Selecting the right PartitionKey is critical to avoid


performance issues like "hot spots."
 Custom Indexes: Cosmos DB allows creating custom indexes to optimize queries.
 Consistency Trade-offs: Higher consistency levels result in higher latency, while lower
consistency levels offer lower latency.

Study Notes

 Avoiding "Hot Spots": Choose partition keys that distribute data evenly across
partitions to prevent overloading a single partition.
 Consistency Levels: Understand the trade-offs between different consistency levels to
choose the best one for your application's needs.

Chapter Summary

 Cosmos DB: Provides globally distributed, low-latency access to data with multiple APIs
and consistency levels.
 PartitionKey: Critical for performance; must be chosen carefully.
 Custom Indexes: Enhance query performance.
 Consistency Levels: Five levels offering trade-offs between consistency and latency.
 Lifecycle Management: Policies to manage data movement and storage cost efficiency.

Important Code Snippets

 Creating a Cosmos DB Container with a PartitionKey:


powershell
Copy code
$cosmosDBAccount = "YourCosmosDBAccountName"
$resourceGroupName = "YourResourceGroupName"
$databaseName = "YourDatabaseName"
$containerName = "YourContainerName"
$partitionKeyPath = "/yourPartitionKey"

az cosmosdb sql container create `


--account-name $cosmosDBAccount `
--resource-group $resourceGroupName `
--database-name $databaseName `
--name $containerName `
--partition-key-path $partitionKeyPath

 Setting Consistency Level:

powershell
Copy code
az cosmosdb update `
--name $cosmosDBAccount `
--resource-group $resourceGroupName `
--default-consistency-level "Session"

Thought Experiment and Answers

1. Partition Key Hot Spots: To resolve "hot spots," change the partition key to distribute
data more evenly across partitions. This requires creating a new container with the new
partition key and migrating the data using the AzCopy tool.
2. Long-term Storage: Upgrade to a Gen2 Storage Account and use lifecycle management
policies to automatically move data to the archive tier for cost-effective long-term
storage.

Section 2.2: Develop Solutions That Use Blob Storage

Key Terms and Definitions

 Blob Storage: Azure's service for storing large amounts of unstructured data such as text
or binary data.
 Access Tiers: Different pricing tiers based on access frequency:
o Hot: For data that is accessed frequently.
o Cool: For data that is infrequently accessed.
o Archive: For data that is rarely accessed.
 Lifecycle Management: Policies that automatically move data between access tiers
based on specified criteria.

Important Points

 Blob Storage Movement: You can move blob items between containers within the same
Storage Account or between different Storage Accounts.
 Access Tiers: Use cool and archive tiers for cost savings on infrequently accessed data.
 SDK Interaction: Use appropriate SDKs (Software Development Kits) to interact with
and manage Blob Storage data.

Study Notes

 Efficient Data Management: Implement lifecycle policies to manage data movement


and reduce storage costs.
 Access Tiers Explained:
o Hot: Suitable for frequently accessed data.
o Cool: Cost-effective for data accessed less frequently.
o Archive: Lowest cost for data rarely accessed.

Chapter Summary

 Blob Storage: Provides scalable and cost-effective storage for large amounts of
unstructured data.
 Access Tiers: Different pricing tiers help manage storage costs based on data access
frequency.
 Lifecycle Management: Automates data movement between access tiers to optimize
storage costs.

Important Code Snippets

 Creating a Blob Storage Container:

powershell
Copy code
$resourceGroupName = "YourResourceGroupName"
$storageAccountName = "YourStorageAccountName"
$containerName = "YourContainerName"

az storage container create `


--name $containerName `
--account-name $storageAccountName `
--resource-group $resourceGroupName

 Setting Lifecycle Management Policies:

json
Copy code
{
"rules": [
{
"name": "MoveToCool",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToCool": {
"daysAfterModificationGreaterThan": 30
}
}
},
"filters": {
"blobTypes": ["blockBlob"]
}
}
},
{
"name": "MoveToArchive",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToArchive": {
"daysAfterModificationGreaterThan": 180
}
}
},
"filters": {
"blobTypes": ["blockBlob"]
}
}
}
]
}

Thought Experiment and Answers

1. Handling "Hot Spots" in Blob Storage: Implement appropriate lifecycle policies and
use the correct access tiers to manage storage efficiently.
2. Cost-Effective Long-Term Storage: Use lifecycle management and access tiers to move
processed data to the archive tier, ensuring cost-effective long-term storage.

These summaries provide condensed insights and definitions from Chapter 2, covering sections
2.1 and 2.2 of the study material on Cosmos DB storage and Blob Storage, along with key terms,
study notes, chapter summaries, important code snippets, and thought experiment answers.

Chapter 2: Develop for Azure Storage

Section 2.1: Develop Solutions that Use Cosmos DB Storage

Key Terms and Definitions:

1. Cosmos DB: A premium, globally distributed database service designed for


low-latency, high-performance applications.
2. PartitionKey: Defines the partition where the entity is stored; critical for
performance.
3. APIs for Cosmos DB:
o SQL: Query JSON objects using SQL syntax.
o Table: Evolution of Azure Table Storage with custom indexes.
o Cassandra: Column-based database, compatible with Cassandra.
o MongoDB: Document-based structure, compatible with MongoDB.
o Gremlin: Graph structure for vertices, edges, and properties.
4. Consistency Levels:
o Strong: Guarantees most recently committed data, higher latency.
o Bounded Staleness: Guarantees consistency within a lag (K versions
or T seconds).
o Session: Consistent within a client session.
o Consistent Prefix: Guarantees read order without ensuring complete
data.
o Eventual: No guarantee on read order, best performance.

Study Notes:

1. Selecting the Appropriate API: Choose based on the structure of data:


o Use SQL for document-based data.
o Use Table for high-performance, low-latency needs.
o Use Cassandra for key-value data.
o Use MongoDB for NoSQL needs.
o Use Gremlin for graph data.

2. Partitioning Schemes:
o Logical Partitions: Share the same partition key.
o Physical Partitions: Group of replicas managed by Azure.
o Choosing Partition Key: Avoid "hot spots" by distributing data
evenly.

3. Interacting with Data:


o Use SDKs in .NET, Java, Node.js, Python.
o Example Code Snippet:

csharp
Copy code
await this.container.UpsertItemAsync(person);
await this.container.DeleteItemAsync<Person>(person1.Id,
partitionKey);

4. Consistency Levels:
o Adjust based on application needs for performance vs. data
consistency.
o Use session consistency for a balanced approach.

5. Creating Cosmos DB Containers:


o Set properties like IndexingPolicy, TimeToLive, ChangeFeedPolicy, and
UniqueKeyPolicy during creation.
o Plan carefully as some properties can't be modified later.

6. Server-Side Programming:
o Write stored procedures, triggers, and user-defined functions in
JavaScript.
o Example Stored Procedure:

javascript
Copy code
function createNewDocument(docToCreate) {
var context = getContext();
var container = context.getCollection();
var response = context.getResponse();
var accepted =
container.createDocument(container.getSelfLink(), docToCreate,
function (err, docCreated) {
if (err) throw new Error('Error creating a new document: '
+ err.message);
response.setBody(docCreated);
});
if (!accepted) return;
}

Chapter Summary:

 Cosmos DB provides low-latency, globally distributed database solutions.


 PartitionKey is critical for performance; choose wisely.
 Various APIs cater to different data structures: SQL, Table, Cassandra,
MongoDB, Gremlin.
 Five consistency levels balance between data consistency and performance.
 Containers have configurable properties for indexing, TTL, change feed, and
unique keys.
 Server-side programming in Cosmos DB uses JavaScript for stored
procedures, triggers, and user-defined functions.

Thought Experiment and Answers:

1. Hot Spots Solution:


o Change the partition key to distribute items evenly.
o Migrate data using AzCopy tool.

2. Cost-Effective Long-Term Storage:


o Upgrade to Gen2 Storage Account.
o Use lifecycle management policies to move data to archive tier.
Section 2.2: Develop Solutions that Use Blob Storage

Key Terms and Definitions:

1. Blob Storage: Ideal for storing unstructured data like images, videos, and
documents.
2. Access Tiers:
o Hot: Frequently accessed data.
o Cool: Infrequently accessed data.
o Archive: Rarely accessed data.
3. Azure Storage Explorer: Graphical tool for managing Azure Storage
services.
4. AzCopy: Command-line tool for bulk copy operations.
5. Lifecycle Management Policies: Automate movement between access
tiers.

Study Notes:

1. Moving Items in Blob Storage:


o Use Azure Storage Explorer for graphical interface.
o Use AzCopy for command-line operations.
o Example AzCopy Command:

bash
Copy code
azcopy copy <URL_Source_Item><Source_SASToken>
<URL_Target_Container><Target_SASToken>

2. Setting and Retrieving Properties and Metadata:


o System properties are managed by Azure.
o User-defined metadata is key-value pairs.
o Example Code Snippet:

csharp
Copy code
container.Metadata.Add("department", "Technical");
container.SetMetadata();

3. Interacting with Data Using SDKs:


o Microsoft provides SDKs for .NET, Java, Python, JavaScript, Go, PHP,
and Ruby.
o Example Code Snippet:

csharp
Copy code
BlobServiceClient sourceClient = new
BlobServiceClient(SourceSASConnectionString);
BlobServiceClient destinationClient = new
BlobServiceClient(DestinationSASConnectionString);
await
destinationBlobReference.StartCopyFromUriAsync(sourceBlobReference
.Uri);
await sourceBlobReference.DeleteAsync();

Chapter Summary:

 Blob Storage is cost-effective for storing unstructured data.


 Access tiers optimize cost and performance based on data usage.
 Tools like Azure Storage Explorer and AzCopy facilitate blob management.
 Lifecycle management policies automate data movement to cost-effective
tiers.
 Properties and metadata provide additional data management capabilities.

Thought Experiment and Answers:

1. Dealing with "Hot Spots":


o Adjust the partition key to distribute data evenly.
o Use the AzCopy tool for data migration.

2. Secure and Cost-Effective Long-Term Storage:


o Use Gen2 Storage Account with lifecycle policies.
o Move processed data to archive tier to save costs.

 Section 1.1: Implement Solutions That Use Virtual Machines


 Section 1.2: Create Azure App Service Web Apps
 Section 1.3: Implement Azure Functions
 Section 2.1: Develop Solutions that Use Cosmos DB Storage
 Section 2.2: Develop Solutions That Use Blob Storage
 Section 3.1: Implement User Authentication and Authorization
 Section 3.2: Implement Secure Cloud Solutions
 Section 4.1: Integrate Caching and Content Delivery within Solutions
 Section 4.2: Instrument Solutions to Support Monitoring and Logging
 Section 5.1: Develop an App Service Logic App
 Section 5.2: Implement API Management
 Section 5.3: Develop Event-Based Solutions
 Section 5.4: Develop Message-Based Solutions

You might also like