You are on page 1of 70
Container Environment Variables Cheat sheets Exams and Flash cards a> www.exampro.co/az-204 Environment variables (Env Vars) allow you to pass configuration details to your containers. Environment variables can be set via the Azure Portal, CLI or PowerShell 2 ey = 2 ® ecard Secured Environment Variables By default Environment Variables are store in plaintext. If you need to secure your environment variables you iste can use the ~-secure-environment-variables flag eer 2 Container Persistent Storage n cards df www.exampro.co/a2-204 Azure Containers are stateless by default. You can mount the fallowing exterfial volumes: When a container crashes or stops all state is loss. Azure Files (file share) To persist state you need to mount an external volume * Secret volume + Empty Directory * Cloud git repo See aT ar To mount a file volume you need do ee this via PowerShell or CLI and specify Sie the details to mount the drive orate my-fileshare \ Poa 2 Container Troubleshooting To troubleshoot a container you can. pul logs with ESE To get diagnostic information during container —_ To start an interactive container run ~___ in To get metrics such as CPU usage arcrttectis SRUERSEATIST > cis cases Azore Container Images CheatSheet om CCheat sheets, Practice Exams and Flash cards i* ww.exampro.co/2z-204 Ature Container instances (ACK) allow you to URERTSSHAMIN without the need to worry about configuring or managing the underlying vietual machine ‘Azra Container instances is designed for iolate containers: + simple applications © taskautomation + build jobs Containars can be provisioned within seconds where VMs can tak several inites Containers are billed per second where VMs are billed per hour (greater savings) Containers have granular and custom sizing of vCPUs, Memory and GPUs where VMs sizes are predetermined ACT can deploy both Windows and Linux containers You can pers rage wth Ata la for your AC cotainers Adis ae accessed via'a fll qualified domain name (FQDN) eg customlabel.ozureregionazurecontainerio. Container Groups ae collection of containers that get scheduled onthe same host machine, +The containers ina container group share: Lifeeyle, Resources, local twat storage ehamies + container Groups are similar toa Kubernetes pod + Multi-container groups currently support ony Linox containers. There are two ways to deploy a mult-container group: + Resource Manager Template (ARM template) — when you need to deploy additional Azure service resources + YAML lle — when your deployment inclides only container instances. A container restart policy specifies what a container should do when their process has completed. ACI has has 3 restart-policy options ‘+ Always (default) Containers are ‘Suited for long running tasks eg. web-servers ‘* Never Containers ‘Suited for one off tasks. eg. background jobs + OnFalure Containers that encounter an error Azure Container Images CheatSheet Cheat sheets, Prattice Exams and Flash cards worwsexampro.co/aa-208 ‘Azure Containers are stateless by default. ‘When a container crashes or stops all state is loss. ‘To persist state you need to mount an external volume + You can mount the following external volumes: + Azure Files (fle share), Secret volume, Empty Directory, Cloud git repo Container troubleshooting (azure CLI commands you show know} ‘+ az container logs ~ pull logs ‘+ azcontainer attach - diagnostic information during container startup ‘+ az container exec - interactive container run ‘+ azmonitor metrics lst - get metrics such as CPU usage on Cheat sheets, Practice Exams and Flash cards if www.exampro.co/az-204 fizure Container Registry (7ICR) CR Create and maintain Azure container registries to store and manage your private Docker container images and related artifacts. G& Azore Container Registry , Practice Exams and Flash cards > www.exampro,co/az-204 Azure Container Registry is a managed, private Docker registry Service based on the open-source Docker Registry 2.0 Cheat sh Use Azure Container Registries with your existing container development and deployment pipelines, use Azure Container Registry Tasks to build container images in Azure. Pull images from an Azure container registry Many Azure services have direct support to use ACR to various deployment targets: ‘Azure Kubernetes Service (AKS) + Kubernetes + Azure App Service + Dc/os. + Azure Batch + Docker Swarm + Auure Service Fabric + and more! Developers can also push to a container registry as part of a. * Many ways to work with ACR via: container development workflow with delivery tools such as: Azure CU + Azure Pipelines + Azure PowerShell * Jenkins + Azure Portal + Azure SOK + Docker Extension for Visual Studio Code @ Azore Container Registry Tasks Cheat sheets, Practice Exams and Flash cards a www.exampro.co/az-206 AACR Tasks allow you to SEBIRGEE OS Sid SINE WBHIBSEEHING for your Docker containers. For Quick tasks you can push a single container image to a container registry on-demand, in Azure, without needing a local Docker Engine installation You can trigger automated builds by: You can create multi-step tasks + source code updates * updates to a container's base image * Timers ona schedule Each ACR Task has an associated source code context * the location of a set of source files used to build a container image or other artifact Tasks can take advantage of run variables + reuse task definitions and standardize tags for images and artifact Azore Container Registry CheatSheet Cheat sheets, Practice Exams and Flash cards worwsexampro.co/aa-208 Aure Container Registry isa managed, private BSEREEREEISRVSERES based on the open-source Docker Registry 2.0 Use Azure Container Reglstries with your existing container development and deployment pipelines, Use Azure Container Regitry Tacks to bull container images in Azure Pullages fom on Ari conainer registry to Vorious dana tai + Kuberetes * pc/os © Docker Swarm ‘Azure Container Registry (ACR) Tasks allow you to SURSRIaRTOS iE NaITEWSTR DREN fr your Docker containers. + You can trigger automated bulds by. * source code updates 3 pats tora caine ba i * Timerscnaschedle + You can ereate multi-step tasks * ach ACR Task hes an associated souren code context Tasks can take advantage of run variables on Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 Azure “App Service icky abl6 Yad BREE WEB BBB Azure without worrying about the underlying infrastructure (® Introduction to Azure App Service Cheat sheets, Practice Exams and Flash cards a= www.exampro.co/az-204 Azure App Service is an HTP2based service for hosting web applications, REST APIs, and mobile back ends. You can choose your programming language and either a Windows and Linux environment. Itis a Platform as Service, so it’s the Heroku equivalent for Azure. ‘Azure App Service takes care of the following underlying infrastructure + Security patches for OS and languages + Load balancing + Autoscaling + Automated manager ‘When you create your app you have to choose a unique name since it becomes a fully qualified domain Azure App Service makes it easy to implement common Integrations and features such as: * Azure DevOps (For deployments) + Github Integration + Docker Hub Integration + Package Management + Easy to setup staging environments + Custom Domains + Attaching TLS/SSL Certificates You pay based on an Azure App Service Plan: + Shared Tier — Free, Shared (Linux not supported) + Dedicated Tier — Basic, Standard, Premium, PremiumV2, PremiumV3 + Isolated Tier Aaure App Services can also run docker single or multi-containers ( Azore App Service — Rontimes Cheat she 1s, Practice Exams and Flash cards i wowexampro.co/23-204 What is a Runtime Environment? Aruntime software/instructions that are executed while your program is running. Aruntime generally means what programming language and libraries and framework you are using. Aruntime for Azure App Services will be a pre-defined container that has your programming language and commonly used library for that language installed. With Azure App Services you choose a runtime. Azure App Services will have generally multiple latest + NET versions of of a programming language eg. Ruby 2.6, 2.7 + NET im Its common to for a cloud provider to stop supporting lay older versions so you keep current and forces customer to * Noe keep good security practices by having latest patches + PHP Python ae rss @ S eB vee @ ( Azore App Service — Custom Container Cheat sheets, Practice Exams and Flash cards wornsexampro.co/az-204 Azure App Service allows you defined eustom containers for Windows or Linux You might want to create your own custom container to use a different runtime or bundle in a packages or software &S & Create your own BBEK8t Container Push the Docker container to Deploy your Container on your local environment Azure Container Registry Image to (® Azore App Service — Deployment Slots Cheat sheets, Practice Exams and Flash cards wwrnexampro.co/az-208 Deployments Slots allow you to create different environments of your web-application associated to a different hostname, This is useful when need a staging, or QA environment. Think of it as a way to quickly clone your production environment for other uses. You can also Swap environments This could be how you perform a Blue/Green deploy. You can promote our staging to production by swapping, if something goes wrong you could swap them back. (® Azore App Service — App Service Environment Cheat sheets, Practice Exams and Flash cards wurm.exampro.co/az-208 App Service Environment (ASE) is an Azure App Service feature that provides a fulllyisolated and) for securely running App Service apps at high scale This allow you to host: ‘App Service environments (ASEs) are appropriate for + Windows web apps application workloads that require: + Linux web apps + Very high scale * Docker containers + Isolation and secure network access. + Mobile apps + High memory utilization * Functions Customers can create multiple ASEs within a single Azure region or across multiple Azure regions making ASEs ideal for horizontally scaling stateless application tiers in support of high requests per second (RPS) workloads. ASE comes with its own pricing tier (Isolated Tier) ASEs can be used to configure security architecture ‘Apps running on ASEs can have their access gated by upstream devices, such as web application firewalls (WAFS) App Service Environments can be deployed into Availability Zones (AZ) using zone pinning. There are 2 deployment types for an App Service environment (ASE): 1, External ASE 2. ILBASE (® Azore App Service — App Service Environment Cheat sheets, Practice Exams and Flash cards www.exampro.co/a2-204 External ASE exposes the ASE-hosted apps on an internet-accessible IP address. God) Azure virtual Network (Net) Fionn | y+ mare et ra on a saw soncrenionmcg AH + > TA | site-to-ite or Expressoute VPN } Because the ASE is within the VNet, it can also access resources within the VNet without any additional configuration. If the VNet is connected to your on-premises network, apps in your ASE also have access to resources there without additional configuration, (® Azore App Service — App Service Environment Cheat sheets, Practice Exams and Flash cards wornsexampro.co/az-204 Go) Azure Vitual Network Net) pPraiiee Virtual P address (VIP) Subnet ia | @— mate . —_— HEL | stete-ste or Expresnoute VEN The internal endpoint is an internal load balancer (ILB) (® Azore App Service — Deployment Cheat sheets, Practice Exams and Flash cards i www.exampro.co/az-204 What is Deployment? The action of pushing changes or updates from a local environment or repository into a remote environment. Azure App Services provides many ways to deploy your applications: * Run from Package * Deploy ZIP or WAR (Uses Kudu) * Deploy via FTP * Deploy via cloud sync (Dropbox or One Drive) * Deploy continuously (GitHub, BitBucket, and Azure Repos) uses Kudu and Azure Pipelines * Deploy using a custom container CI/CD pipeline (Deploy for Docker Hub or Azure Container Registry) * Deploy from local Git (Kudu build server,) * Deploy using Github Actions * Deploy using Github Actions containers * Deploy with template (ARM templates) (® Azure App Service — Deployment Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-204 Run from a package is when the files in the package are not copied to the wwwroot directory. Instead, the ZIP package itself gets mounted directly as the read-only wwwroot directory. Allother deployment methods in App Service have Since the same directory is used by your app at runtime, it's deployed to the following directory: because of file lock conflicts, + (Windows) D-\home\site\wwwroot and for the app to behave unpredictably because some of ear (Liners) WNW frotnestte/ orev ct the files are not yet updated. & Azure App. Service — Deployment and Flash cards a> www.exampro.co/az-204 ZIP and WAR file deployment uses the same KudulServiee that powers continuous integration-based deployments. Kudu is the engine behind git deployments in Azure App Service. It’s an open-source project that can also run outside of Azure Kudu supports the following functionality for ZIP file deployment: Ya canopy Catng + Deletion of files left over from a previous deployment + Azure CLI + Option to turn on the default build process, which includes package restore | prure API via REST (cURL) * Deployment customization, including running deployment scripts + Azure Portal + Deployment logs + Afile size limit of 2048 MB ae 209-nare: a ee eee een eect Prateany es (® Azure App Service — Deployment Cheat sheets, Practice Exams and Flash cards www.exampro.co/az-204 You can use (File Transfer Protocol) FTP protocol to upload files. You will need your own FTP client. You just drag and upload your files. Go to the Deployment Center i Use an FTP connection to access and copy app fles. ‘Ses omtpond ounaay eta metenone tar copper ee Get the FTP credentials for your FTP client (® Azure App Service — Deployment Cheat sheets, Practice Exams and Flash cards i> www.exampro.co/az-204 You can use Dropbox or OneDrive to deploy using a cloud sync. Dropbox is third-party cloud OneDrive is Microsoft's cloud storage service storage service You go to Deployment Center, configure for Dropbox or OneDrive. 3, ‘When you turn on Sync it will create a folder in your drop cloud drive: ‘OneDrive: Apps\Azure Web Apps Dropbox: Apps\Azure This will sync with your /home/site/wwwroot, so you just update files in that folder. @ Azure App Service Plan Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-208 ‘Azure App Service Plan defines H6W Vou Bay aiid What FesoUreeS af aVallaBle to you. There are 3 pricing tiers for App Service Plan shared Tiers 5 There are 2 shared: Free, Shared ed Free Ter provides: + 168 of disk space sere + upto 10 apps on a single shared instance es + NoStA for availabilty + Each app has a compute quota of 60 minutes per day Shared Tier provides = '* up to 100 apps ona single shared instance _ + NoStA for availabilty Included hardware + Each app has a compute quota of 240 minutes per day Soa erent Shared Tiers does not support Linux-based instances 0 SE ene anny @ Azure App Service Plan Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 ‘Azure App Service Plan defines HeW/VeU pal and What resourees|ar@lavallable to you. There are 3 pricing tiers for App Service Plan Dedicated Tiers Basic, Standard, Premium, Premiumv2, PremiumV3 Basic + More disk space + Unlimited apps + 3 levels in this tier that offer varying amounts of compute ower, memory, and disk storage ® Azure App Service Plan Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 ‘azure App Service Plan defines HW VOU pal anid What resoUurees/ar@|aVallablé to you. There are 3 pricing tiers for App Service Plan Dedicated Tiers Basic, Standard, Premium, PremiumV2, PremiumV3 Basic + More disk space + Unlimited apps + 3 levels in this tier that offer varying amounts of compute power, memory, and disk storage Standard + scale out to three dedicated instances + SLA of 99.95% availability + levels in this tier that offer varying amounts of compute power, memory, and disk storage ® Azure App Service Plan Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 ‘Azure App Service Plan defines HW VOU pa anid What résoUurees/ar@|aVallablé to you. There are 3 pricing tiers for App Service Plan Dedicated Tiers Basic, Standard, Premium, Premiumv2, PremiumV3 Basic + More disk space + Unlimited apps + 3 levels in this ter that offer varying amounts of compute power, memory, and disk storage Standard + scale out to three dedicated instances + SLA 0f 99.95% availability + Blevels in this tier that offer varying amounts of compute power, memory, and disk storage Premium + scale to 10 dedicated instances + availability SLA of 99.95% + multiple levels of hardware ® Azure App Service Plan Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-208 ‘Azure App Service Plan defines HoW/VeU pal and What resourees|arelavallable to you. There are 3 pricing tiers for App Service Plan Isolated Ti x + dedicated Azure virtual network pee Full network and compute isolation + scale out to 100 instances + availabilty SLA of 99.95% (® Azure App Service — WebJobs Cheat sheets, Practice Exams and Flash cards wwrnexampro.co/az-208 Webiobs is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app, API app, or mobile APP. the following fle types are supported: There is no additional cost to use Weblobs. + cmd, .bat, exe (using Windows cmd) WebJobs is not yet supported for App Service on Linux. * .psi (using PowerShell) + sh (using Bash) + php (using PHP) + py (using Python) + is(using Nodes) sigoer6 © Continuous A] Weblobs Types continous + Continuous — run continually until stopped CRON Expression * © + Supports debugging e072 Triggered ‘+ Triggered — run only when triggered - + (expose a webhook that can be called to enable scenarios like scheduling) scilst6 + Doesn't support debugging Malt instance A] Weblobs Seale (Only for Continuous) + Multi Instance — will scale your WebJob across all instances of your App Service plan *+ Single Instance — will only keep a single copy of your WebJob running regardless of Single Instance ‘App Service plan instance count Mult instance Azore App Services CheatSheet om Cheat sheets, Practice Exams and Flash cards wwrm.exampro.co/sz-208 ure App Service isan TTPSESESUSERVERor hosting web applications, REST APIs, and mobile backends + You can choose your programming language and ether a Windows and Linux environment {isa Platform as Service, so it's the Heroku or AWS Elastic Beanstalk equivalent fr Azure. ‘Azure App Service makes it easy toimplement common Integrations and features such a: '* Azure DevOps (For deployments) > Github integration + Docker Hub Integration + Package Management Easy to setup staging environments > custom Domains {attaching TLs/38tCertfiates You pay based on an Azure App Service Pan + Shared Tier — Free, Shared (Linux not supported) Dedicated Tier — Basi, Standard, Premium, Premium2, Premium¥3 + isolated Tier Azure App Services you supports the following runtimes: .NEY,.NET Core, laa, Ruby, Nodes, PHP, Python Azure App Services can also run decker single or mui containers + Custom Containers are supported, create docke ile, upload to Azure ConiainesReistry and deploy Deployments Slots alow you to create SifSRSREASHMIERE of your web- application + YoU can also Swap environments This could be how you perform a Blue/Green deploy. Azore App Services CheatSheet Exam od Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-208 ‘App Serve Environment (AS) isan Azure App Servic feature that provides 2 iE or securely runing aie bere be Mattia customers can crete mukiple AS + althin a singe Azure region + aero multiple Azure regions making ASES ‘+ ideal for horizontally scaling stateless application tiers in support of high requests per second (RPS) workloads. {ASE comes with ts own pricing ter (Soated Ter '* ASEs can be used to configure security architecture '* Apps running on ASEs can have their access gated by upstream devices, such as web application firewalls (WAFS) '* App Service Environments can be deployed info Availability Zones (AZ) using zone pinning. < Thereare2 deployment types for an App Service environment (ASE) 1 Enteral ASE 2. IUBASE Azure Ap Services provides many ways to deploy your applications: isa feature of Azute App Servic that enables you to run a program or script inthe same instance asa web app, APl app or mobile app. ‘+ There is no additional cost to use Weblobs. What is a Key / Value store? Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 Key values stores are dumb and fast. Indexes ‘Aggeration T° Asimple key/value store will interpret this data resembling a dictionary (aka Associative arrays or hash) Due to their simple design they can scale well beyond a Akey/value stores a unique [Key Value key alongside a value Data 1010101000101021001010010101001, “= [wor (0110101100010101010101011100010 Rotaren | 0010101001010130010101010101010 ey Value Data (species: android, rank: commander’) Wort {eoecies: Klingon, rank: it commander’ } Rolaren | (species: bajoran affiliation: maquis’) key/value store ean resempre® [S2ri0ame) [Species [Rank ‘filation tabular data, it does not have to. | Data andriod | ut commander have the consistent columns per | Worf Klingon | Ut commander row (hence its schemaless) fotaan —Tbajorn Ts relational database What is a Document store? Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Adocument store is a NOSQL database that stores deeuments as its primary data structure. ‘A document could be an XML but more commonly is ISON or JSON-Like Document stores are sub-class of Key/Value stores ‘The components of a document store compared to Relational database Database (RDBMS) Database (Document) Tables Collection . LLL Documents [tere =}, [Embectine ana untine] _MongoDB s and Flash cards a wwrw.exampro.co/az-204 MongoDB is an open-source document database Which stores ISON-like documents The primary data structure for MongoDB is called BSON Binary SON (8SON) BSON isa subset of ISON and so its data structure is very similar + BSON is designed to be efficient both in storage space and scan-speed compared to ISON — + BSON has more data-types than JSON: ‘Eg, Datetime, byte arrays, regular expressions, MDS binary data, javascript code What it looks like to perform an ——3 operation on a MongoDB databases MongoDB CCheat sheets, Practice Exams and Flash cards i> ww.exampro.co/22-204 MongoDB supports searches against + fields + ranged queries + regular-expressions MongoD8 supports primary and secondary indexes High availability can be obtained via replica sets (replica to offload reads or acts a stand-by in case of failover) MongoD8 scales horizontally using sharding MongoD8 can run over multiple servers via load balancing MongoDB can be used as a file system, called GridFS + with load balancing and data replication features over multiple machines for storing files. MongoDB provides three ways to perform aggregation (grouping data during a query) + aggregation pipeline + map-reduce + single-purpose aggregation MongoDB supports fixed-size collections called capped collections MongoDB claims to support multi-document ACID transactions What is a Graph database? Cheat sheets, Practice Exams and Flash cards wurm.exampro.co/az-208 A graph database is a database composed of a data structure that uses vertices (nodes, dots) which form relationship to other vertices via edges (arcs, lines) Use Cases for Graph Database: © preva deleeen The edge can contains relational data + Real-time recommendation engines. such as direction and data properties + Master data management (MDM) * Network and IT operations. + Identity and access management (IAM) + Traceability in Manufacturing + Contact Tracing + Data Lineage for GDPR * Customer 360-degree analysis (marketing) + Product recommendations * Social Media graphing The node will contain data properties + Feature Engineering (ML) Id: 10 name: milk percentage: 3% Pasteurized: false Id: 12 name: yogurt style: greek —_—_——____- : CHILD_OF process: ferment What is a Apache TinkerPop? Cheat sheets, Practice Exams and Flash cards wurmexampro.co/az-208 Maiti Apache TinkerPop is ais : ETT TUOMRRE or both graph databases (OLTP) and graph analytic systems (OLAP) TinkerPop enables developers to use an vendor-agno’ framework to traverse (query) many different graph systems: rusted Alibaba Graph Database Hadoop (Spark) OrientDB ‘Amazon Neptune HGraphOB Overflow0B ‘ArangoDB Huawei Graph Engine Service Apache S2Graph Bitsy HugeGraph Salg Blazegraph 18M Graph stardog CosmosDB JanusGraph TinkerGraph ChronoGraph JanusGraph (Amazon) Titan DSEGraph Neo4 Titan (Amazon) GRAKN.AI neodj-gremlin-bolt Titan (Tup!) Unipop ¥ TinkerPop includes a graph traversal language called GFSmiliA Which is the single language that can be used for all these graph systems What is Gremlin? Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Gremlin is the graph traversal language for Apache TinkerPop Gremlin is design to the "Write once, run anywhere” (WORA) Gremlin traversal can be evaluated as ( + real-time database query (OLTP) * orasa batch analytics query. (OLAP) — x Gremlin Host Language Embedding means You can use your favourite programming language to write Gremlin Azure Tables Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Auure Table storage is a a NOSQUNEY/NANUUStHBPE| within Azure Storage Accounts Azure Table stores non-relational structured data with a schemaless design There are two ways to interact with Auure Tables: + Azure Table Storage API + Microsoft Azure Storage Explorer aay Azore Tables - Adding Entries Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 When you enter data you must providea Add Entity + Partition Key — unique identifier for —_| rer ore tee ve the partition within a given table Pert + en + Row Key — unique identifier for an ft «wt entity within a given partition tok ro ax ‘Azure Tables supports: + String - Bina * Boolean teary * Binary oe + DateTime vate + Double + Guid + im32 + Intea Azure Tables - Querying Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 You can query data along the Partition and Row Key. You also further filter for any filters f] 2 £§ + 2®e & x CoseGuey impot Emer — Add-—«ESL_~“Seect A Column Options Delete Tabid BREABROaA> And/Or +xo + X Gan vf Rowkey +X Gad v + Aad new clause © Introduction to CosmoDB Cheat sheets, Practice Exams and Flash cards ih wwww.exampro.co/a2-204 Azure CosmoDB is a service for fully-managed NoSQL databases that are designed to scale and high performance CosmoDB supports different kinds of NoSQL database engine which you interact via an API: + G6reSQil (document datastore) + Azure Cosmos DB API for MORBODB (document datastore) + Azure Table (key/value datastore) + Gremlin (graph datastore) * Based on Apache TinkerPop syaene ‘Pop All of these NoSQL engines specific capacity: + Provisioned throughput (pay for guarantee of capacity ) + Serverless (pay for what you use) Capacity mode gg CosmoDB Explorer n cards df www.exampro.co/a2-204 terface to explore and interact with your CosmoDB accounts CosmoDB Explorer is a we “> cosmos.azure.com eer olen + Fnamporebase ne «om - = Diststios a = | a ' Here is a CosmoDB Core SQL In CosmoDB Explorer adding 2 document to the database & CosmoDB Explorer Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/a2-204 Welcome to Cosmos DI oaty sere, muted sata sec fea When navigating within Azure toa ComsoDB Account under Data Explorer is the same as CosmoDB Explorer @ CosmoDB Explorer > wowexampro.cofaz-204 Using CosmobB Explorer With a Graph Database (Gremtin) . YI nr & CosmoDB Table API vs Azure Table Cheat sheets, Practice Exams and Flash cards wornexampro.co/az-208 When comparing Account Storage Azure Table vs CosmoDB Table API Feature ‘Azure Table Storage ‘Azure Cosmos DB Table AP! Latency Fast, but no upper bounds on latency. ngle-digit millisecond latency for reads and writes ‘Throughput Variable throughput model Guaranteed backed by SLAs. “Tinit oF 20,000 operations/s No upper limit on throughput Global distribution Single region with one optional readable 30+ regions secondary read region Indexing Only primary index on Partitionkey and RowKey. Automatic and complete indexing on all properties, no index No secondary indexes. management, Query Query execution uses index for primary key, and Queries can take advantage of automatic indexing on properties scans otherwise. for fast query times. Consistency ‘trong within primary.region Five well-defined consistency levels Eventual within secondary region. Pricing, Consumption-based consumption-based or provisioned capacity Stas 99.99% availability 29.99% availabilty SLA (some conditions does not) —<—>" Azure Tables and CosmosDB CheatSheet om QD Cheat sheets, Practice Exams and Flash cards i www.exampro.co/az-204 Azure Tables — a key / value data store + can be hosted on Account Storage, its designed for a single region and single table + can be hosted on CosmosDB, its designed for scale across multiple regions CosmosDB — A fully-managed NoSOL service that supports multiple NoSOl engines called APIs + Core SQL API (default) — a document database, you can use SQL to query documents + Graph API — a graph databases, you can use Gremlin to traverse the nodes and edges + MongoDB API — a mongodb database (document database) + Tables API — Azure Tables Key/Value Apache TinkerPop — an open-source framework to have an agnostic way to talk to many graph databases + Gremlin — graph traversal langauge to traverse nodes and edges MongoD8 — an open-source document database + Binary JSON (BSON) — An storage and compute optimized version of JSON, introduces new data types ComosDB Explorer — a web-ui to view cosmos databases Introduction to Cosmos DB Cheat sheets, Practice Exams and Flash cards wurm.exampro.co/az-204 Azure Cosmos DB is a service for fully-managed NoSQL databases that are designed to scale and high performance Cosmos DB supports different kinds of NoSQL database engine which you interact via an API: + GoreSQU (document datastore) + Azure Cosmos DB API for MORgODB (document datastore) + Azure Table (key/value datastore) + Gremlin (graph datastore) * Based on Apache TinkerPop aero ‘Pop All of these NoSAL engines specific capacity: + Provisioned throughput (pay for guarantee of capacity ) + Serverless (pay for what you use) Capacty mode © Provsioned throughput C) Serveres Learn more about capacity mode ‘| What is Cosmos DB? Cheat sheets, Practice Exams and Flash cards > www.exampro.co/a2-204 Main Advantages of Azure Cosmos DB Integrates with many Azure Services e.g., Azure Functions, Azure Kubernetes Services, Azure App Services Integrates with many databases APIs like the native Core SQL, MongoDB, Cassandra, Gremlin Integrates with many development SDKs like .Net, Java, Python, Node.Js Has a schema-less service that applies indexes to your data automatically, resulting in fast queries Guaranteed uptime SLA of 99,999% availability Data replication between Azure Regions is automatic, -rest and role-based access. Data protected with enerypt Autoscale is provided to handle a variety of workload sizes. Cosmos DB APIs Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Different types of APIs are available in Azure Cosmos D8 to support a wider range of applications. @ 27 (Default) API for using Azure Cosmos DB enables When you create a Cosmos DB account querying your data with a language similar to SQL. you have to first choose the DB API © sed to communicate with Azure Table Storages Core (SQL) - Recommended and allows indexes in the partition and row keys. ‘ore (SQL) - Recomment Cosmos DB's core. or native API rking with documents. Supports yment wth familiar used for communicating with MongoDB databases and document storage. sat. ge and cet libraries ER sed to communicate with Cassandra using Cassandra Query Language and storing data as a partitioned row store. Ecos move Wovens ed to creat» grap-based data view tat can be ueried using graph traversal language cosandra Cosmos DB — Core Components Cheat sheets, Practice Exams and Flash cards wwrm.exampro.co/sz-208 Database — Each Azure Cosmos DB account supports multiple independently named databases. A database is a logical namespace for collections, users, and permissions Container — a unit of compute, Collection — maps to a container in Azure Cosmos DB. itis a billable entity, where the cost is determined by the provisioned throughput expressed in request units per second, Cosmos DB Explorer Cheat sheets, Practice Exams and Flash cards df www.exampro.co/22-204 @ daystrom-cosmo-db | Data Explorer Welcome to Cosmos DB oaty srt, muted daha Serve or ny sale When navigating within Azure to a vevcunne ComsoDB Account under Data Explorer - —! is the same as CosmoDB Explorer Tes Cosmos DB Explorer > worw.exampro.cofaz-204 Using CosmobB Explorer With a Graph Database (Gremlin) = Ne —| Partitioning Schemas in Cosmos DB Cheat sheets, Practice Exams and Flash cards wwrm.exampro.co/sz-204 The data among partitions in Azure Cosmos DB indexes is grouped by the partition keys in order to improve performance. Main concepts of BaPitioning SeHeMas in Azure Cosmos DB BEPRIEIGHIREYB are the keys used to group items. Works ike primary keys. ‘A Dogieal partition is a group of items that all have the same partition key value. _Phisieal Partitions consists of a set of logical partitions, Azure Cosmos DB manages logical partitions, which can have one to many. [REBIRSISB are made up ofa group of physical partitions that are materialized asa self managed, dynamically load-balanced group of replicas that span across multiple fault domains. © Partitioning Schemas in Cosmos DB Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 ach BVSIESIBSPRIH consists of a set of replicas, aka a replica set. Tea RNA are mapped to physical partitions that are distributed globally. Partition’ set in the image net refers to a group of physical = —“- — partitions that manage the same logical partition keys Leela 2 across multiple regions ion n wo = = Choosing a partition key Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 A partion key has two components: SARE BSR an the SARSRNVNR, E.g,, consider an item { "userl If you choose “userld” as the partition key, the following’are the two partition key components: 1. The FRSA use The partition key path accepts alphanumeric and underscore(_) characters. ‘You can also use nested objects by using the standard path notation(/). * Partition key © fia 2. The BFRRIGAIREYWAIUR eg: “Ancrew" ‘The partition key value can be of string or numeric types. Your partition key for all containers should be: + a property that has a value which does not change. + You can't change the value of a property if it's your partition key. + a property that should have a wide range of possible values + Spread request unit (RU) consumption and data storage evenly across all logical partitions. + This ensures even RU consumption and storage distribution across your physical partitions. Choosing a unique keys Cheat sheets, Practice Exams and Flash cardsigf+ wwrnexampro.co/aa-208 Unique keys provide developers with the ability to add a layer of ‘Unique keys D data integrity to their database eee By creating a unique key policy when a container is created, you + Add unique key ensure the uniqueness of one or more values per partition key. A unique key is scoped to a logical partition. if you partition the container based on the ZIP code, you end up with duplicated items in each logical partition. You can't update an existing container to use a different unique key Aunique key policy can have a maximum of 16 path values Each unique key policy can have a maximum of 10 unique key constraints or combination When a container has a unique key policy, Request Unit (RU) charges to create, update, and delete an item are slightly higher. Unique key names are case-sensitive Cosmos DB — Containers Cheat sh 1s, Practice Exams and Flash cards df wwwexampro.co/a3-204 Rauire Cosmos Containers are useful for scalability in Azure oer Cosmos DB, both in terms of storage and throughput. ‘They are beneficial when you need a different set of configurations for each of your ‘Azure Cosmos DBs because they allow you to customize each container individually. Azure Cosmos Container has some SaiitalisEpSEIfIe BFOBEREIGE, and those properties, which can be system-generated or user-configurable, vary according on the used API. Properties of Cosmos DB Containers Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 An Azure Cosmos container has a set of system-defined properties. Depending on which ABI you use, some properties might not be directly exposed. The following table describes the list of system-defined properties: System-deined System repety erased centigurale ws spam genenec stoetes s Spe wt Ste = stoetes so conigvate Enya ued for Last upded same ote And many more... Cosmos DB Containers ~ Capacity Cheat sheets, Practice Exams and Flash cards i www.exampro.co/az-204 What is capacity? Capacity defines the amount of underlying resources are available to support consumption of resources such as compute and storage Cosmos DB has two capacity modes: 3 + Provisioned throughput + Serverless ity mode © Provsioned troughput O Severs veam more abou capaciy mode Provisioned Throughput Serverless For each of your containers, you provision some amount of throughput expressed in Request Units (RUs) per second You run your database operations against your containers without having to provision any capacity + For workloads where you can reliable + For low (small) workloads predict traffic * For unpredictable spike and traffics + More flexible options + Easy to configure, with limitations Cosmos DB Containers ~ Capacity Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Geo-distribution Maximum storage /per container Performance Billing model Provisioned Throughput Can run in unlimited multiple regions Unlimited < 10 ms latency for point-reads and writes covered by SLA Billing is done on a per-hour basis for the RU/s provisioned, regardless of how many RUs were consumed, Serverless Can only run ina single region 50GB < 10 ms latency for point-reads and < 30 ms for writes covered by SLO Billing is done on a per-hour basis for the amount of RUs consumed by your database operations. Cosmos DB — Database-Level Shared Throughput Cheat sheets, Practice Exams and Flash cards wornsexampro.co/az-204 When creating a database and a container you to can configure i6/aI=FERE TS UBHUR SSTERIGS 1. Dedicated mode — throughput is exclusive to this container and backed by SLAs 2. Shared Mode — throughput is shared across all containers You cannot change throughput strategies after creation + Toswitch throughput strategies you need to migrate data to a newly created container. * Database id O @ create new Ouse exsting [imsmvannew Share throughput across containers When check boxed it will be in shared mode Shared Throughput is not available for Capacity Mode of Serverless Why share or not share throughput? Sharing the database-level provisioned throughput among its containers is analogous to hosting a database on a cluster of machines. Because all containers within a database share the resources available on a machine, you naturally do not get predictable performance on any specific container Cosmos DB Containers — Reading Data Cheat sheets, Practice Exams and Flash cards i wwn.exampro.co/2z-204 There are two ways to read data from Cosmos DB: * Point Reads * Queries Point Reads Queries A point read is a key/value lookup on a A.query allows you to return multiple items single item 1D and partition key. Latency ~10ms Varies RU Charges 1RU At least 2.3 RU Number Items Returned Litem Unlimited Required Recommended Cosmos DB Containers — Request Units Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 The cost of all database operations is normalized by Azure Cosmos DB and is expressed by Request Units (RU) RUs abstracts away Memory, CPU and IOPS right-sizing with a single value based on data processed Database operations include: + Read — the size of the item retrieved, 1KB=1RU, 100KB = 10 RUs ‘+ Insert — Inserting a 1 KB item without indexing costs around ~5.5 RUS. + Upsert — Replacing an item costs two times the charge required to insert the same item. + Delete + Query — the size of the items retrieved [Fa] calculating Capacity can be confusing to do manually so its best to use the Capacity Calculator ie :[{cosmos.azure.com/capacitycalculator © Consistency levels in Cosmos DB Cheat sheets, Practice Exams and Flash cards www.exampro.co/az-204 Azure Cosmos DB provides five different consistency levels to maintain data availability and querying performance depending on your requirements + higherlatency «Strong _—-Bounded:staleness Session Consistent Prefix Eventual = _Lowerlatency de 2 3. 4 5. Strong — Linearizability. Reads are guaranteed to return the most recent version of an item Bounded Staleness — Consistent Prefix. Reads lag behind writes by at most k prefixes or t interval Session — Consistent Prefix. Monotonic reads, monotonic writes, read-your-writes, write-follows-reads Consistent Prefix — Updates returned are some prefix of all the updates, with no gaps Eventual — Out of order reads You set default consistently at the Cosmos DB account-level under Default Consistency blade (STRONG BOUNDED STALENESS GRIM) CONSISTENT pREFDC EVENTUAL ~~» Consistency levels in Cosmos DB Cheat sheets, Practice Exams and Flash cards wwrnsexampro.co/az-204 Read operations ensure that the most recent data is returned. Read operations costs the same as Bounded Staleness but more than session and eventual consistencies Write operations can only be read after the data has been replicated by most replicas. Read operations are lagged behind writes operation due to time or version differences Read operation costs the same as Strong Consistency and more than session and eventual consistency. Has the highest level of consistency compared to session consistency, consistent-prefix consistency, and eventual consistency. Recommended for globally distributed applications, with high availability and low latency. Consistency levels in Cosmos DB Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 + Read operations ensure that written data is consistent within the same session. + Consistency is scoped to a user session, while other users may encounter “dirty” data if another session has just written it. + Default consistency level used to newly created databases. + Reading cost are lower than Bounded Staleness and Strong Consistency, but higher than Eventual Consistency. + Read operations ensures that the most recent data replicated among the replicas is returned, but it does not guarantee that the data is the most recent. + "Dirty” data occurs when one replica changes the data state, but this data has not yet been replicated. * Has a stronger consistency level than the Eventual Consistency but less than any others. + Read operations does not guarantee any consistency level + Lowest consistency level + Lowest latency and best performance among the consistency levels + Least expensive read operations cost compared to any other consistency levels Change Feed Notifications with Cosmos DB Cheat sheets, Practice Exams and Flash cards wwrm.exampro.co/sz-208 Change Feed is an Azure Cosmos DB service that Monitors changes in all containers and distributes events triggered by those changes to multiple consumers, Change feed in Azure Cosmos DB is a persistent record of changes to a container in the order they occur. ‘Cosmos DB Change Feed Azure has an SDK for: .Net, Java, Python and Node JS Change Feed is Supported for SL API, Cassandra API, MongoDB API, Gremlin API + No support for Table API Change Feed Processor Library Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-208 The change feed processor is composed of four components: 1. Monitor container — where any insert or update executes, the operations are reflected in the change feed. 2. Lease container — stores the states and coordinates the change feed processor. 3. The host —an application instance that uses the change feed processor to listen for changes. 4. The delegate —the code that runs when any event in the change feed notifications triggers it The change feed processor may be hosted among 8 ree ‘Azure services that support long-running tasks eg: =a i Grune Weblabe: wrrae] (errr) [wee] [-wror ‘+ Azure Virtual Machines + Azure Kubernetes Services + Azure .Net hosted services SSoominnee) Cotati | “CSecancr) Lease collection “A ia aah Cheat sheets, Practice Exams and Flash cards a www.exampro.co/az-204 Azure Storage 7iccounts — Contains all of your Azure Storage data objects: blobs, files, quieties, fables, and disks =} Introduction to Storage Accounts Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 ‘Azure Storage offers S8vBralltypes Of Storagelaccounts. Storage typg and Account Kind means the same thing, Each with different features and their own pricing models + General-purpose v1 (legacy) + Blobstorage (legacy) + BlockBlobStorage + FileStorage Th econ ocean eee Storage accounts vary with the following features: =e = Supported Services (What cam | putin this storage account?) => Bob, File, Queue, Table, Disk, and Data Lake Gen2 Bo. a Performance Tiers (how fast will my read and writes be?) — ne Standard and Premium Access Tiers (how often do | need quick access to files?) Hot, Cool, Archive Replication (How many redundant copies should be made and where?) LRS, GRS, RA-GRS, ZRS, GZRS, RA-GZRS Deployment model (Who should deploy the supported services?) Resource Manager, Classic

You might also like