You are on page 1of 65
APIM — Advanced Policies n cards df www.exampro.co/a2-204 Control flow + Conditionally applies policy statements based on the evaluation of Boolean expressions, Forward request + Forwards the request to the backend service, Limit concurrency + Prevents enclosed polices from executing by more than the specified number of requests at atime. Log to Event Hub ‘Sends messages in the specified format to a message target defined by a Logger entity Emit metrics + Sends custom metrics to Application Insights at execution. ‘Mock response ‘+ Aborts pipeline execution and returns a mocked response directly to the caller. Retry + Retries execution of the enclosed policy statements, if and until the condition is met. Execution will epeat at the specified time intervals and up to the specified retry count. Return response + Aborts pipeline execution and returns the specified response directly to the caller. APIM — Advanced Policies Cheat sh xams and Flash cards a wwrwexampro.co/az-204 Send one way request + Sends a request to the specified URL without waiting for a response. Send request + Sends a request to the specified URL Set HTTP proxy + Allows you to route forwarded requests via an HTTP proxy. Set variable + Persist a value in a named context variable for ater access. Set request method + Allows you to change the HTTP method for a request. Set status code + Changes the HTTP status code to the specified value, Trace + Adds custom traces into the API Inspector output, Application Insights telemetries, and Resource Logs. wai + Waits for enclosed Send request, Get value from cache, of Control flow policies to complete before proceeding. APIM — Ruthentication Policies n cards ef www.exampro.co/a2-204 Authenticate with Basic + Authenticate with a backend service using Basic authentication. Authenticate with client certificate + Authenticate with a backend service using client certificates. Authenticate with managed identity ‘+ Authenticate with a backend service using a managed identity. _APIM — ~ Caching Policies c wwwexampro.co/a2-204 + Perform cache look up and return a valid cached response when available, Store to cache + Caches response according to the specified cache control configuration, Get value from cache + Retrieve a cached item by key. + Store an item in the cache by key. Remove value from cache + Remove an item in the cache by key. APIM — Cross Domain Policies www.exampro.co/az-204 * Makes the API accessible from Adobe Flash and Microsoft Silverlight browser-based clients. ‘Adds cross-origin resource sharing (CORS) support to an operation or an API to allow cross-domain calls from browser-based clients. JSONP ‘Adds JSON with padding (SONP) support to an operation or an API to allow cross-domain calls from JavaScript browser-based clients, APIM — Transformation Policies n cards > www.exampro.co/a2-204 Convert SON to XML + Converts request or response body from JSON to XML ‘convert XML to JSON + Converts request or response body from XML to ISON. Find and replace string in body + Finds a request or response substring and replaces it witha different substring, Mask URLs in content + Re-writes (masks) links inthe response body so that they point to the equivalent link via the gateway. Set backend service + Changes the backend service for an incoming request. Set body + Sets the message body for incoming and outgoing requests. Set HTTP header + Assigns a value to an existing response and/or request header or adds a new response and/or request header. Set query string parameter + Adds, replaces value of, or deletes request query string parameter. Rewrite URL + Converts a request URL from its public form to the form expected by the web service. Transform XML using an XSLT ‘Applies an XSL transformation to XML in the request or response body. APIM — Dapr Integration Policies n cards if www.exampro.co/a2-204 Send request to a service + uses Dapr runtime to locate and reliably communicate with a Dapr microservice. Send message to Pub/Sub topic + uses Dapr runtime to publish a message to a Publish/Subscribe topic. Trigger output binding + uses Dapr runtime to invoke an external system via output binding. APIM — - Validation Policies n cards df www.exampro.co/a2-204 Validate content + Validates the size or JSON schema of a request or response body against the API schema. Validate parameters Validates the request header, query, or path parameters against the API schema, Validate headers + Validates the response headers against the API schema, Validate status code + Validates the HTTP status codes in responses against the {API schema, Validate GraphQl request, + Validates and authorizes a request to a Graph API APIM — APIs Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-208 Defining a New API via: + HTTP + WebSockets + Graphat From Definition: + Openapl v3 + WADL + WSDL From Azure Resource Logic App. + App Service + Function App Define a new API Create from definition Create from Azure resource i OpenAPI xan ew OpenAP! Specification (OAS) defines a standard, language- agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection, ‘Swagger and OpenAPl used to be the same thing but as of OpenAP! V3, Swagger and OpenAPl are two different things ‘+ Swagger = Tools for implementing the specification (OpenAP! can be represented as either JSON or YAML pars ee ay epee er ep fers Proeaa) net) a) WADL and WSDL 1 Exams and Flas! are both XML files that describe REST web:services. ‘WADL ‘wsDL application definition grammars types Resource Interface + resources@base + resource@path + servicer:endpoint@address Method + @id, @name, @href operation + @name, @pattern, @safe, @style request / response input / output + xparam@type + @element +_srepresentation@element param xsd:element + @type + _@type param xsdisimpleType + _option@value +_restriction::enumeration@value isa www.exampro.co/az-208 7 WSDL example APIM — Developer Portal Cheat sheets, Practice Exams and Flash cards df www.exampro.co/22-204 Developer portal is an automatically generated, fully customizable website with the documentation of your APIs. It is where API consumers can discover your APIs, learn how to use them, request access, and try them out. + You need to publish, for the Developer Portal to be publicly viewable + You can save revisions of the portal, to quickly rollback to previous versions * You can apply a custom domain for your Developer Portal Developer portal URL Roe pa bhttes//apim-a7204 developer azure-apinet Q) © ies Bien This feature is available in the Premium, Standard, Basic, and Developer tiers of API Management. APIM Authentication — Developer Portal Cheat sh Practice Exams and Flash cards if www.exampro.co/a2-204 You can configure many different types of authentications within APIM: + Azure Active Directory + Azure AD B2C + Identity Providers (IdPs): Google, Microsoft, and Facebook, * Basic authentication (default) Basic authentication (Basic Auth) is a built-in authentication method for Azure AP! Management that requires the developer to register with an email and password in order to obtain an API key, which is then used in requests to authenticate the requestors. Delegated authentication, allows you to use your own web-app sign-in sign-up and product subscription instead of the built-in developer portal built-in functionality APIM Authentication — Developer Portal CCheat sheets, Practice Exams and Flash cards i www.exampro.co/23-204 @ ExamProAPIM | Identities ‘Add identity provider = APIM — Built-In Cache Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 APIs and operations in API Management can be configured with response caching, Response caching can significantly reduce latency for API callers and backend load for API providers. Caching Policy applied to outbound Built-in cache is volatile and is shared by all units in the same region in the same AP! Management service. APIM — External Cache Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 You can utilize a Redis cache externally instead of using the built-in cache. Using an external cache allows you to overcome a few limitations of the built-in cache: ‘Avoid having your cache periodically cleared during API Management updates Have more control over your cache configuration Cache more data than your API Management tier allows to Use caching with the Consumption tier of API Management Enable caching in the API Management self-hosted gateways You simply need to provide a Connection String to your Redis Cache Distributed Application Runtime Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 d an jp Diributed Application Runtime (Dapr) provides an APIs that simply microservice connectivity, r Dapr is @ portable, event-driven runtime that makes it easy for any developer to build resilient, stateless and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks. Appliestion code anycotesriomevon. “GO redes twin Hl im GC @ @ Dapr provides a bunch . of functionality —> dapr Any dod of edge infrastructure 2 vnc Mrscounsare m8 Orceegecind Cmnbacoat Qtudemenas SE ween Azure Event Grid Cheat sheets, Practice Exams and Flash cards af www.exampro.co/az-204 "Ze RRUPEEVEREGH is» service that allows you to manage &, event routing from any source to any destination. Event Grid provides a simple and strong customizable event delivery process that allows you to manage at a minimum level which types of events will be received as well as which subscribers will receive those events. It supports event fan-out with 24-hour retry reliability to ensure that events are delivered. It is a low-cost serverless product that supports dynamic scalability. Event Grid is ideal for event-driven architectures, where you can subscribe to Azure resource ‘events and publish them to an event handler or webhook. ‘You can also use Custom Topies to create custom events that will be published in your Event Grid. Azore Event Grid — Event Sources and Handlers Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-208 ZGPSIEVEREGHA is divided into two categories: Event Sources and Event Handlers. Event Sources — se [ein storage ) Resource Groups stron Event Hub Qed service lo Hub @ service Bus © hase wops (@ daure container Regsry s that emit data Event Handlers — services that receive data SignalR Serverless Code . H> Functions Azure App Configuration dy ave Machine eanng Workflow and integration ravecormniaimsewee|| Menremy | > Service tus {:%} tose apps Azure Cache for Reds = Buffering and Competing Consumers Pearcodtiets Event Hub [TT] storage Queue ‘Azure Policy Other Services and Applications ivr oneston webct automation (ebsedet) npg Custom Events (anything) Azure Event Grid — Key Concepts Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Events are the event that occurred in the service. Publishers is the service that published the event. Event Sources are where the event took pace cE Subseriptin att Domains are used to group Event Grid topics that are = Domain Event Subscriptions are the a = mechanism the routes the events. [> Topic AS" <<<-----[ Subscription A2 ——> > Event Subscriptions Expiration is dL Subscription AS» I where you set an expiration for ‘Azure AD event subscriptions Event Handlers isthe app or service that receives the events L_, topic 8 =~ Event Delivery is the delivery of ‘oP! ‘Azure AD P=] Endpoint -'= Subscription B1 ——> > = Subscription B2——> > events in batches or as single events Batching Is the sending of a group of events ina single request. Topics are the endpoint where events are sent ‘+ system Topics are built-in topics provided by Azure Services. ‘+ Custom Topics are applications and third-party topics. ‘+ Partner Events provide @ way for third parties SaaS to publish events. Azure Event Hub Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 "Sr ARGPRIEVEREHUB is an event ingestor that can consume millions of events from anywhere and £21 process them in real-time or micro-batching, thanks to the auto-inflate feature, which automatically scales the number of throughput to meet your changing needs. It provides an easy way to connect with your Apache Kafka applications and clients. ‘consumer ‘roup 1 vent Be Receivers Event Producers Peccicteeeenennnnen dhl Gai Consumer ‘group 2 Azure Event Hub — Pricing Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 —_ Basic— Standard Premium Dedicated* Capacity $0.015/hour per TU $0.03/hour per TU $1.233/hour per PU $6.849/hour per CU Ingress events 0.028 per million events | 0.028 per million events | included Included Capture $73/month per TU Included Included Apache Katka Yes Yes Yes Schema Registry Yes Yes Yes Max Retention Period | 1 day 7 days 90 days 90 days Storage Retention | 84GB 84.68 178 per PU 178 per CU $0.12/68/month $0.12/GB/month + Capacity Unit (CU) + Processing Unit (PU) ‘+ Throughput Unit (TU) 10 TB included per CU Azure Event Hub — Key Concepts Cheat sheets, Practice Exams and Flash cards wornsexampro.co/az-204 Azure Event Hub helps you build your big data pipeline to analyze logging, anomalies, user, and device telemetry where you only pay for what you use. ‘Azure Event Hub Key Concepts + Namespace is an endpoint for receiving and distributing events to event hubs. + Event Hub is where your events will be delivered + Event Hub Cluster is a dedicated Event Hub with a 99.99% SLA ‘+ Event Hub Capture allows you to automatically capture and save streaming events. + Events Hubs for Apache Kafka, Event Hub endpoints are compatible with Apache Kafka. + Event Publishers are applications or services that publish events to an Event Hub + Publisher Policy is a unique ID used to identify publishers. + Partitions are used to organize the sequence of events in an Event Hub. + Event Consumers are applications or services that read events from an Event Hub. + Consumer Group enable consuming applications to each have a separate view of the event stream + Stream Offset holds the position of an event inside 2 partition. + Checkpointing is the process of distinguishing between read and unread events Azoure Event Hub — Scaling Cheat sheets, Practice Exams and Flash cards a www.exampro.co/az-204 Throughput Units ‘Auto-Inflate: Enable Autoinfite © ‘Automatically scale up to the maximum ‘TUs based on traffic demand Not available for basic pricing tier ‘Ao ttt Maxum Throughput Units Pricing tir Premium (-$750 USD pe PU per Month) ‘rows the aval pans and ther features Processing Units * Azure Event Hub Entities — Event Hub Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 (Myeventhb Parition Count Partition Count Partitions are a data organization mechanism that relates to the downstream parallelism required in consuming applications. The number of partitions in an event hhub directly relates to the number of concurrent readers you expect to have. Message Retention cK“ tinted This isthe retention period for events. You can set the retention period between 1 oo <-> ‘and 7 days. Learn more about Message Retention Capture enables you to automatically deliver the streaming data in Event Hubs to an Azure Blob storage or ‘Azure Data Lake Store account of your choice, with the added flexibility of specifying a time or size interval. Setting up Capture is fast, there are no administrative costs to run it, and it scales automatically with Event Hubs throughput units. Event Hubs Capture is the easiest way to load streaming data into Azure, and enables you to focus on data processing rather than on data capture Azure Event Hub — Producer Cheat sh xams and Fl www.exampro.co/a2-204 A producer (aka publisher) emits data to the stream Publishers can publish events using the follow protocols: + HTTPS + Most Azure SDKs use HTTPs + AMQP 1.0 * Kafka protocol Generally you'll be using the to publish events. You can publish event either: + One-at-a-time + Batches For authorization, publishers use either: + Azure AD with OAuth2-issued JWT tokens + Shared Access Signature (SAS) Azure Event Hub — Producer Cheat sheets, Practice Exams and Flash cards wwrm.exampro.co/az-208 HTTPS vs AMQP for publishing events. + AMOP requires the establishment of a persistent bidirectional socket in addition to transport level security (TLS) or SSL/TLS + AMP has higher network costs when initializing the session + AMP has higher performance for frequent publishers and can achieve much lower latencies when used with asynchronous publishing code. + HTTPS requires additional TLS overhead for every request. Publisher Policies Event Hubs enables granular control over event publishers through publisher policies + Publisher policies are run-time features designed to facilitate large numbers of independent event publishers + With publisher policies, each publisher uses its own unique identifier when publishing events to an event hub, using the following mechanism: Azure Event Hub — Consumer ‘Aconsumer (aka reader) receives data to process from them stream All Event Hubs consumers connect via the AMQP 1.0 session and events are delivered through the session as they become available. The client does not need to poll for data availability Azure Event Hub — Consumer Groups Cheat sheets, Practice Exams and Flash cards wurm.exampro.co/sz-208 Aconsumer group is a view (state, position, or offset) of an entire event hub Consumer groups enable multiple consuming applications to each have a separate view of the event stream, and to read the stream independently at their own pace and with their own offsets In a stream processing architecture, each downstream application equates to a consumer group. There's always a default consumer group in an event hub, and you can create up to the maximum number of consumer groups for the corresponding pricing tier. There can be at most 5 concurrent readers on a partition per consumer group; however it's recommended that there's only one active receiver on a partition per consumer group. Some clients offered by the Azure SDKs are intelligent consumer agents that automatically manage the details of ensuring that each partition has a single reader and that all partitions for an event hub are being read from. This allows your code to focus on processing the events being read from the event hub so it can ignore many of the details of the partitions. Event Hub Azure Event Hub — Offsets Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 An offset is the position of an event within a partition. Offsets enables a Consumer (reader) to specify a point in the event stream from which they want to begin reading events. + You can specify the offset as a timestamp or as an offset value. + Consumers are responsible for storing their own offset values outside of the Event Hubs service * Within a partition, each event includes an offset Azure Event Hub — Checkpointing Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 Checkpointing is a process by which readers mark or commit their position within a partition event sequence Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group This responsibility means that for each consumer group, each partition reader must keep track of its current position in the event stream, and can inform the service when it considers the data stream complete Azure Event Hub Entities — Schema Registry Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Event Hubs Schema Registry provides a centralized repository for schemas. This provides the flexibility for your producer and consumer applications to exchange data without having to manage and share the schema between them and also to evolve at different rates. ‘Schema Groups are under your namespace and can be accessed by all topics/event hubs under that namespacé Serialization Type * Avro v Compatiiity * None Backward Forward What is Apache Kafka? , Practice Exams and Flash cards www.exampro.co/az-204 Apache Kata son EEN 0 create high-performance da & kafka. Cheat she pipelines, streaming analytics, data integration, and mission-critical applications. Kafka was originally developed by Linkedin, and open-sourced in 2011 & S> Java Kafka was written in Scala and Java. to use Kafka you need to write Java code, [Producer | | Producer | | Producer | In Kafka data is stored in partitions on a Kafka Cluster which 7 can span multiple machines (distributed computing) Katka Cluster _ Tore] [Tone] [Tone Producers publish messages in a key and value format rwmes)| | (rmes)| | ram Using the Kafka Producer API exer] (rr) | si [| fe os oo ‘Consumers can listen for messages and consume them = eS using the Kafka Consumer API Consumer] [Consumer | [Consumer Messages are organized into Topics. Producers will push messages to topics and consumers will listen on topics. Azure Event Hub — Kafka Compatibility Cheat sheets, Practice Exams and Flash cards > www.exampro.co/a2-204 Event Hubs provides an endpoint compatible with the Apache Kafka producer and consumer APIs for version 1 and above Event Hub Kafka Compatibility is alternative to running your own Apache Kafka cluster Kafka Event Hub Cluster Namespace Event Hub Partition Consumer Group Consumer Group Offset Offset Azure Event Hub — Partitions Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-208 nt Hub Event Hubs organizes sequences of events sent to an event hub into one or more partitions As newer events arrive, they're added to the end of this sequence. Partitions hold the following data about the event: * body of the event * user-defined property bag describing the event + metadata such as its offset in the partition + its number in the stream sequence + service-side timestamp at which it was accepted. Partitioning allows for multiple parallel logs to be used for the same event hub and therefore multiplying the available raw IO throughput capacity. You can use a parti ‘The partition key is a sender-supplied value passed into an event hub. n key to map incoming event data into specific partitions for the purpose of data organization. Azure Event Hub — Event Retention Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-208 Published events are removed from an event hub based ona configurable, timed-based retention policy The default value and shortest possible retention period is 1 day (24 hours) For Event Hubs Standard, the maximum retention period is 7 days. For Event Hubs Premium and Dedicated, the maximum retention period is 90 days. If you change the retention period, it applies to all messages including messages that are already in the event hub. You cannot explicitly delete events ‘The reason for Event Hubs' limit on data retention based on time is to prevent large volumes of historic customer data getting trapped in a deep store that is only indexed by a timestamp and only allows for sequential access. = If you need to archive events beyond the allowed retention period, you can have them automatically = stored in ABUFSSROFag or AfUifeDatallaklby turning on the Event Hubs Capture feature. If you need to search or analyze such deep archives, you can easily import them into EGEISVRIB or other similar stores and analytics platforms Azore Notification Hub Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 I The goal of Azure Notification HUB is to send notifications to mobile apps in order to increase app engagement and usage. You can use tags to filter which apps or users will receive notifications, and those apps can be registered in Azure Notification Hub in two different ways. In the IRENE, the app sends an installation request to Azure Notification Hub, including all information needed for the installation to be completed. This model is easier to set up and maintain. In the Registration model, the app sends an Azure Notification Hub registration request with the PNS handlers and tags, and Azure Notification Hub responds with the registration ID. Native or generic templates can be used in order to define the message. Azure Notification Hub — Supported Platforms Cheat sheets, Practice Exams and Flash cards www.exampro.co/a2-208 Andriod i- + Firebase Cloud Messaging + Google loud Message ios iOS = Apple Push Notification service (APNS) * Notifications Hub for 10S 13 * Objective-C SDK * Notification Hub for Xamarin iOS Applications EDD Windows Phone Microsoft Push Notification Service (MPNS). EE Windows + Universal Windows Platform (UWP) app + Windows Push Notification Service (WNS) Azure Notification Hub — Message Flow Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 1. When an app wants to receive a notification, it ‘contacts the PNS for the target platform it's running on and requests for a unique and temporary push handle. The handle type depends on the system (e.g., WNS Uses URIs while APNS uses tokens). 2. The client app stores this handle in the app backend or provider. 3. The app backend contacts the PNS using the handle to target a specific client app to send a push notification. 4. The notification is sent to the device specified by the handle by the PNS. Azore Notification Hub — Key Concepts Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 Azure Notification Hub Key Concepts: + ROUBIAg is the process of selecting which registrations will receive the push notification, * Broadcast, all registrations will receive the push notification + Tag, registrations that contain the specific tag will receive the push notification + Tag Expression, registrations that match the tag expressions will receive the push notification + Notification Hub Namespace group one or more Notification Hub + Tags are used to label applications so that they can be routed more efficiently. + Templates define the format on how the client will receive the push notifications. Is platform-independent. + Each platform has is own BlSEESERINGRFESSRISERUEBTENS] which isin charge of sending push notifi Queveing Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/a2-208 Both Azure Storage Queue and Azure Service Bus offer a messaging queueing as a service. ‘Azure Storage queue a simple message queuing service to store large numbers of messages an handle millions of messages No guarantee of the order of messages At-Least Once Delivery 500 TB Max Queue Size 64KB Message Size (48 KB for Base64 encoding) Unlimited Queues Unlimited Concurrent Clients Leased-based Access mode 30 seconds to 7 days Set for the entire queue ne ‘Azure Service Bus Broader messaging service that supports queuing, publish/subscribe, and more advanced integration patterns Offers First-In-Frst-Out (FIFO) + Guarantees the order of messages being consumed At-Least Once or At-Most Once Deliver 1GB to 80 GB Max Queve Size 256 KB or 1 MB 10,000 Max Queues 5,000 Concurrent Clients Locked-based Access Mode + 6Oseconds* + Can change settings per message Dead Lettering Supported State Management Supported ‘Messaging group Supported De-Dupping Supported Purging Queue Supported Transactions supported Azure Queve Storage Cheat sheets, Practice Exams and Flash cards wurm.exampro.co/sz-208 ft ‘ARUFEGUEUEIStOFagE queues is a simple message broker that enables cloud message exchange between applications and services using authenticated HTTP/S protocols with messages up to 64kb in size. IEEE Queue Storage is stored within an Azure Storage Account. You can access them with the (SSS same access keys and connection strings as the rest of the Storage Account’s resources. Aaure Queue Storage offers 3 ways of handling messages on the queue: 1. Peek a message when you retrieve a message from the queue without removing or locking it. 2. Delete a message after the message is processed. 3. Receive a message in the front of the queue but locking it temporarily. ure Queve Storage n cards df www.exampro.co/a2-204 You can create a queue and send messages eld nega qo to the queue via the Azure Portal ey . Most interactions with the queue are performed, pragmatically with Azure SDK or CLI Cremeaecid Creer o f cies Azure Queve Storage — Key Concepts Cheat sheets, Practice Exams and Flash cards wwrmexampro.co/az-208 Queues can be accessed by using the following URL format: | seragescomt —uewe | https://.queue.core.windows.net/ a Gia The following URL addresses a queue in the diagram: https://myaccount.queue.core.windows.net/images-to-download Storage account: A storage account is required for all Azure Storage access. Queue: A queue contains a set of messages. The queue name must be all lowercase. Message: A message of up to 64 KB in any format. Before version 2017-07-29, the maximum time-to-live allowed is seven days. For version 2017-07-29 or later, the maximum time-to-live can be any positive number, or -1 indicating that the message doesn't expire. The default time-to-live is seven days if this parameter is not specified. Azure Queve Storage — CLI Commands Cheat sheets, Practice Exams and Flash cards w+ wwrn.exampro.co/a2-204 L "az storage message You can interact with the queue via the Azure CLI subcomman: clear — Deletes all messages from the specified queue, delete — Deletes the specified message. get — Retrieves one or more messages from the front of the queue. peek — Retrieves one or more messages from the front of the queue, but does not alter the visibility of the message. put — — Adds a new message to the back of the message queue. update — Updates the visibility timeout of a message, Azvre Service Bus Cheat sheets, Practice Exams and Flash cards af wwnn.exampro.co/az-204 Service Bus is a fully managed enterprise message broker that allows you to publish/subscribe to topics and queue messages. It can scale your applications with asynchronous messages and built-in integration with Azure Services You can handle single or batch messaging, load balancing messages, topics subscription, message sessions, and transactions with the guarantee that it complies with industry standards and protocols like Advanced Message ‘Queuing Protocol - AMQP 1.0, Java Message Service - JMS 2.0 for Premium SKU, and JMS 1.1 for Standard SKU. Ss rer [=] PULLS Azure Service Bus Azure Service Bus — Key Concepts Cheat sheets, Practice Exams and Flash cards i ww.exampro.co/2z-204 Service Bus Key Concepts + The namespace works like a server, with N queues and topics. + Queue contains the messages. * Sender is who sends the message. + Receiver is who receives the message + Topic is a queue with multiple receivers that works like a queue. + Subscription is a receiver in a topic + ABatch is a group of messages + Safe-batch validates if each message can be included the batch. + Session allows you to use FIFO and group your messages in a queue. + Peek returns a message to the queue without removing it. + Dead-letter queue: a queue for messages that were unable to be delivered through the normal queue. + Peek & Lock retrieves a message from the queue without removing it and locks it so other receivers cannot receive it. + Receive & Delete retrieves and delete a message from the queue. + Auto delete on idle sets a time span to delete the queue if itis not used + Duplicate detection history checks if the message was not sent earlier before sending a message it Azure Service Bus - Namespace Cheat sheets, Practice Exams and Flash cards wurm.exampro.co/az-208 ‘A namespace is 2 EBhitaifie for alll miessaging components (queues and topics). A single namespace can contain multiple queues and topics, and namespaces are often used as application containers. A Service Bus namespace is a capacity slice of a large cluster made up of dozens of all- active virtual machines that you control. It may optionally span three Azure availability zones. You get all the benefits of running the message broker at massive scale in terms of availability and robustness. Service Bus is serverless messaging so you don't need to worry about underlying complexities. Azure Service Bus - Queves Cheat sheets, Practice Exams and Flash cards a www.exampro.co/az-204 (GURUEE are used to send and receive messages. Messages are stored in queues until the receiving application is ready to accept and process them. Messages in queues are ordered and timestamped on arrival. Once accepted by the broker, the message is always held durably in triple-redundant storage, spread across availability zones if the namespace is zone-enabled. Service Bus never leaves messages in memory or volatile storage after they've been reported to the client as accepted. Messages are delivered in pull mode, only delivering messages when requested. <_— Message Queue with Messages Azure Service Bus — Queve Configuration Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/a2-204 (wane secs? Qe Time to Live (TTL) How long a message stays in the queue before it is removed from the queue or moved to the dead letter queue Lock ation Cenc cea tering on message peat Oem Azure Service Bus - Topics Cheat sheets, Practice Exams and Flash cards a> www.exampro.co/az-204 ‘Topics can be used to send and receive messages. * Queue is often used for point-to-point (1-to-1) communication, * Topics are useful in publish/subscribe (1-to-many) communication. a Topics are not available at the Basic pricing tier, You need standard or premium Multiple, independent subscriptions can be attached to a topic and work in the same way as queues from the receiver's side. A subscriber to a topic can receive a copy of each message sent to that topic. Subscriptions are named entities. Receiver | You can define rules on a subscription. sender Receiver | subscription rule has a filter that specifies, a condition for a message to be copied into the subscription, as well as an optional Topic with three Subscriptions action that modifies message metadata. with Messages Receiver Azore Service Bus - Topics Cheat sheets, Practice Exams and Flash cards i> www.exampro.co/az-204 Create topic x Service Bus Max topic size ( 168 V \@— Seta max topic size between 1-5 GB Message time to ive © Days Hours Minutes Seconds Time to Live (TTL) the message will be removed “ ° ° j— ! . from the event bus 1 Enable autordelete on ide topic © Aria dupticate message Partitioning when scaling large amount of events Enable dupcate detection © Enable partioning © Azure Service Bus - Subscription Cheat sheets, Practice Exams and Flash cards > www.exampro.co/az-204 Max delivery count can be between 1-2000 Message Sessions With sessions enabled a subscription can guarantee first-in-first-out (FIFO) delivery of messages Azure Service Bus - Pricing Cheat sheets, Practice Exams and Flash cards a= www.exampro.co/az-204 ‘Auure Service Bus has three different pricing tiers Basic, Standard and Premium. More expensive tiers provides more functionality. 3 ‘Mine Ping Feature Basle Standard Premium ‘S900 pr 29M Operon pe eh) ‘ue -$905 50 pr 1M Operon pe Month Deduplication| Dead Letter Queve Cheat sheets, Practice Exams and Flash cards a www.exampro.co/a2-208 A dead letter queue is a service implementation to store messages that fail to , common reasons for failed messages: *+ Message that is sent to a queue that does not exist. + Queue length limit exceeded, + Message length limit exceeded. + Message is rejected by another queue exchange. + Message reaches a threshold read counter number, because it is not consumed. Sometimes this is called a "back out queue”. + The message expires due to per-message TTL (time to live) + Message is not processed successfully. Dead Letter queues hold messages that failed to deliver. ‘ADead Letter queue could be used for: + monitoring failed attempts + requeuing failed attempts + Trigger 2 follow up action (remediation or response) Pare Service Bus — Command CLI c xams and Flash cards a> www.exampro.co/az-204 Azure CLI has the following subcommands for Azure Service Bus pari Rec) ore + azservicebus + azservicebus * az servicebus + azservicebus + azservicebus ‘Azure ServiceBus does not have CLI commands to send messages to the queue or topics (unlike Azure Storage Queue) To send messages to the queue, you need to use the Azure SDK (eg. Node.js) TUS nmc ite Event Grid vs Event Hubs vs Service Bus Cheat sheets, Practice Exams and Flash cards www.exampro.co/a2-204 Event Grid, Event Hub and Service Bus all are event driven services for application integration and use an event bus as means to work with event data. & = Azure Event Grid + Serverless Event Bus + Azure service-to-service communication + Dynamically scalable + Low cost + Atleast once delivery of an = ‘Azure Event Hubs + Streaming data + Lowlatency + Can receive and process millions of events per second + Atleast once delivery of an event oa ‘Azure Service Bus + Queue oF Pub/Sub for web applications * Reliable asynchronous message delivery that requires poling + Advanced messaging features lke: + firstin and first-out (FIFO) batching/sessions Transactions dead-letter temporal control routing and filtering duplicate detection + Atleast once delivery of a message + Optional ordered delivery of messages Introduction to Redis Cheat sh xams and Flash cards a wwrw.exampro.co/az-204 What is Redis? Redis is an periSOUrEelintMeMORY AatABASESFE. Redis acts as caching layer, ora very fast database. Since all data is stored in memory it’s highly volatile so data loss is possible. Redis is very fast that it can deliver content from its store with single to double digit milliseconds eg. 10ms Redis is alKéy)/ Valu@'store, supports the following data structures + Strings + Sets + Sorted Sets + Lists + Hashes + Bitmaps + Bitfields + HyperLoglog * Geospatial indexes + Streams _Redis — Strings n cards > www.exampro.co/a2-204 REBESHBRBare the most basic value Strings are binary safe, so they contain data such as Wpeeimage : areas + Serialized Ruby Objects String can have a max length of $12 MB Samet) a aC Atomic counters can be applied to strings that represent a number, + INCR add 1 eee + DECR- subtract 1 + INCBY ~ add a certain amount eg. 10, The most command String commands: + GET—Geta string by its key + SET—Seta string at a key + APPEND — append additional text to end of a string + EXISTS ~ Check if a string exists at specified key _ Redis — Lists n cards > www.exampro.co/a2-204 Redis Lists are ordered collection of strings Lists do not ensure unique strings (you can have duplicates) redis: TTT eess etree) ere ye Gm need (ete) Peter cance Common commands for lists LPOP - Removes and returns the first elements of the list stored at key RPOB- Remove the last element from the list LPUSH ~ Adds a string to the end of the list LPOS — Returns the index of the provided string Redis — Sets Cheat sheets, Pr n cards ef www.exampro.co/a2-204 REBEEEEare an unordered collection of Strings. alga Sy Get Strings are unique within a set, so adding the same atts emorcs string will always only result with one instance. eur) rele Oa etree cg} redis: Se aC Most popular Set Commands: + SADD—add on or more members to a set ‘+ SMEMBERS ~ Get all the members in a set + SMOVE - move a member from one set to another + SPOP - remove and return one or multiple random members from a set _Redis — Hashes Cheat sheets xams and Flash cards af www.exampro.co/az-204 Redis|Hashes represent a mapping between string fields and string values to represent an object Think of it as a collection of key/value pairs like a Samm + JSON Object woe + Ruby Hash Se cam EUmECIce + or Python Dictionary Se cae Ema) ‘Common Commands for Hashes: + HGET— Get the value of a hash field + HDEL - Delete one or more hash fields + HMSET —set multiple hash fields to multiple values + HMGET ~ get multiple hash fields to multiple values + HVALS — Get all the values + HKEY — Get all the fields in a hash Redis — Sorted Sets n cards www.exampro.co/a2-204 Sorted Sets/are a collection of strings that are rrrey ed sorted based on an associated score integer) red Pay eng Sorted Sets are great for Leaderboards. eS cet (fires) Common Sorted Sets commands: Reaiel va * ZADD~adds an element to the set with an associated score WITHSCORES + ZREM—removes an element to the set + ZRANGE - Returns the specified range of elements in the sorted set stored + ZRANK - Returns the rank of member in the sorted set stored + 2SCORE - Returns the score of member in the sorted set Azure Cache for Redis is commonly used t Azure Cache for Redis Cheat sheets, Practice Exams and Flash cards wwrnsexampro.co/az-208 It gives you access to a secure, dedicated Redis cache that Microsoft i Azure Cache for Redis based on the popular open-source Redis cache. manages and that you can access from any Azure application. ‘Azure Cache for Redis is suited for high-throughout and low-latency requirements where the same data is often requested. Store session data so your web-applications are stateless and can take advantage of multiple VMs or Containers Stores cached HTML or JSON to speed up response times for rendering web pages or API calls Used to support a job or message queueing system eg. Sidekiq Used in-front of a database to reduce read contention on the database or improve response times for fetching data * Azure Cache for Redis could be put in front of database services such as Cosmos DB or Azure SQL + The Aside*Cache Pattern is when a Cache Store sits infront of a database Azure Cache for Redis Cheat sheets, Practice Exams and Flash cards i www.exampro.co/az-204 Make web-pages and APIs load fast, Cache DB ‘Your Database Fast database for realtime data_,

You might also like