Develop for azure storage Flashcards

1
Q

What is Azure Blob Storage

A

Object storage used for the cloud - optimized for storing massive amounts of unstructured data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is blob storage designed for?

A

Serving images or documents directly to a browser
Storing files for distributed access
Streaming video and audio
Writing to log files
Backups
Storing data for analysis by an on-premises or azure-hosted service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you access azure blog storage objects?

A

Via REST API, Azure powershell, Azure CLI, or Azure Storage client library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the types of storage accounts?

A

v1 - old standard type, not offered
v2 - Standard - most recommended
Premium - uses solid-state drives.
Choose between block blobs, page blobs, or file shares.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the access tiers for block blob data? What is another name for these tiers?

A

Hot - frequent access of objects
Cool - Storing large amounts of data that is infrequently accessed and stored for at least 30 days
Archive - Several hours of retrieval latency, but remain for at least 180 days. Most cost effective

Another name is the blob lifecycle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the blob storage resource types?

A
  • Storage account
  • Container in the storage account
  • Blob in the container
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What would the account access be for the mystorageaccount

A

http://mystorageaccount.blob.core.windows.net

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the types of blobs?

A
  • Block blobs - for binary data and text
  • Append blobs - optimized for append operations
  • Page blobs - Store random access files up to 8 TB in size. Store virtual hard drive files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Is Azure storage encrypted?

A

Yes, automatically by Storage Service Encryption (SSE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can you specify encryption keys for Azure Storage?

A
  • customer-managed - key provided for encrypting for Blob storage and Azure files
  • customer-provided - on blob storage operations. Can add it with the request to have granular control over encryption.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is LRS, ZRS, GRS, and GZRS?

A
  • LRS - Locally redundant storage - three times copies within a single physical location in the primary region.
  • ZRS - Zone-redundant storage - Copies your data synchronously across three azure availability zones in the primary region
  • GRS - Geo-redundant storage - copies your data three times within a single physical location in the secondary region
  • GZRS - Geo-zone-redundant storage - Copies your data across to a single physical location in a secondary region, and three times in the primary region across three availability zones.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How would you create an Azure storage from Azure CLI? Start from beginning

A

az group create –name –location

az storage account create –resource-group –name –location –kind BlockBlobStorage –sku Premium_LRS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What redundancy types does cold, hot, and archive blobs support?

A

All, except for Archive which is only LRS, GRS, and RA-GRS. No zone stuff.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How is a lifecycle management policy set for azure blobs?

A

Through a collection of rules in a JSON document. Each rule definition has a filter set and an action set.

Generally each rule will have:

  • name
  • type
  • definition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How are lifecycle rules structured?

A
{
"name": ,
"type": "Lifecycle",
"Definition": {
  "filters": {

},
“actions”: {

}
}
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are some rule actions for lifecycle of blobs?

A

tierToCool
tierToArchive
delete

Generally have

daysAfterModificationGreaterThan
or
daysAfterCreationGreaterThan

17
Q

What is a Re-hydrate policy?

A

Rehydrating is where you bring the offline archive data to online.

  • You can either set the blob tier operation
  • Coy blob or copy blob from url operation - most recommended approach
18
Q

What are the namespaces offered in .NET for working with Azure Blob Storage?

A

BlobClient - manipulate azure storage blobs
BlobClientOptions - Client configuration
BlobContainerClient - Access and manipulate storage containers
BlobServiceClient - Provies the top-level namespace for the blob service
BlobUriBuilder - Convenient way to modify the contents of a uri instance to point to different azure storage resources.

19
Q

How can you access container properties and metadata using .NET?

A

Functions part of BlobContainerClient:

  • GetProperties
  • GetPropertiesAsync
  • SetMetadata
  • SetMetadataAsync
20
Q

What is Azure Cosmos DB?

A

A globally distributed functional document database. that is highly available across multiple regions.

21
Q

What is an cosmosDB container?

A

Fundamental unit of scalability - the throughput and storage is managed horizontally.

22
Q

What is the difference between dedicated provisioned throughput mode and shared provisioned throughput mode?

A

Dedicated exclusively reserves a container and is backed by an SLA.
Shared means containers share provisioned throughput.

23
Q

What are the Azure Cosmos DB consistency levels?

A
  1. Strong
  2. Bounded Staleness
  3. Session
  4. Consistent Prefix
  5. Eventual
24
Q

What consistency level would you need for most real-world scenarios?

A
  • Recommended session consistency
25
What consistency level would you need if your application requires strong consistency?
The best for this is bounded staleness.
26
If your application requires eventual consistency what should you use?
Use consisten prefix consistency
27
What are the supported APIs of Cosmos DB?
- Core (SQL) - API for MongoDB - Cassandra API - Table API - Gremlin API - best for making Graph queries.
28
What is a request unit (RU)?
The system of paying for throughput in Cosmos, that represents system resources such as CPU, IOPS, and memory. 1 RU = do a point read, for a 1KB item.
29
What are the ways you provision RUs?
Provisioned throughput mode - specify up front how many RUs you want Serverless mode - no provisioning, just get billed at the end of the pay period Autoscale mode - Automatically and instanly scale the throughput of your database or container based on it's usage.
30
What is a partition key?
A partition key is a way to specify a logical partition within a database. An items index in the data base is determined by the partition key + itemID
31
How should you choose a partition key?
1. Be a property that has a value that does not change. 2. Have high cardinality - a wide range of possible values 3. Spreads request unit consumption and data storage evenly across all locial partitions
32
When will your container require more than a few physical partitions?
When your container will have over 30,000 RUs provisions | When your container will store over 100 GB of data
33
How could you create an azure cosmos DB from the az CLI?
az cosmosdb create --name {name} --resource-group {resource-group} az cosmosdb keys list --name {name} --resource-group {resource-group}