AZ-204 Integration Flashcards
APIM Terminology:
Backend API: Contains the business logic to use
FrontendAPI: Abstraction for backend API
Operation: Operation that correlates a frontend operation to a corresponding backend request
Products: Products are how APIs are surfaced to developers. Products in API Management have one or more APIs, and are configured with a title, description, and terms of use. Products can be Open or Protected. Protected products must be subscribed to before they can be used, while open products can be used without a subscription. Subscription approval is configured at the product level and can either require administrator approval, or be auto-approved.
Subscription: Allows client to use frontend APi or products
How to secure APi with subscriptions?
Use subscription keys:
- Keys are sent in the HTTP request headers or as a query string
- There is a primary and secondary key that can be used to avoid downtime
Use subscription key scopes:
- All API: Applies to every API accessible from the Gateway
- Single API: This scope applies to a single API and all of its endpoints
- Product: This scope applies to a specific product
Secure API with Oauth?
How are API Management policies configured?
Xml document used to describe request and response:
inbound: Statements to be applied to the request
backend: Statements to be applied before the request is forwarded to the backend service
outbound: Statements to be applied to the response
on-error: Statements to be applied on an error
When to use event grid vs event hubs vs service bus?
Event Grid: Allows for reactive programming with events to React to status changes
Event Hubs: A Big data pipeline for events. Used for Telemetry and distributed data streaming.
Service Bus: Enterprise messaging solution used for Order processing and financial transactions.
What is event grid?
Azure Event Grid is an eventing backplane that enables event-driven, reactive programming. It uses the publish-subscribe model. Publishers emit events, but have no expectation about how the events are handled. Subscribers decide on which events they want to handle.
What are the 5 concepts of Event Grid?
events: An event is the smallest amount of information that fully describes something that happened in the system. Every event has common information like: source of the event, time the event took place, and unique identifier. Every event also has specific information that is only relevant to the specific type of event.
An event of size up to 64 KB is covered by General Availability (GA) Service Level Agreement (SLA). The support for an event of size up to 1 MB is currently in preview. Events over 64 KB are charged in 64-KB increments
event sources: An event source is where the event happens.
topics: An event source is where the event happens. Each event source is related to one or more event types. For example, Azure Storage is the event source for blob created events. IoT Hub is the event source for device created events. Your application is the event source for custom events that you define. Event sources are responsible for sending events to Event Grid. System topics are those generated by Azure services (don’t show up in subscription), custom topics are those generated by custom apps and third party topics (show up in azure subscription).
event subscriptions: A subscription tells Event Grid which events on a topic you’re interested in receiving. When creating the subscription, you provide an endpoint for handling the event.
event handlers: From an Event Grid perspective, an event handler is the place where the event is sent. The handler takes some further action to process the event.
What is azure queue storage service? (use service bus most of the time)
SDK for azure queue storage?
What are the default APIM system groups?
Administrators - Azure subscription administrators are members of this group. Administrators manage API Management service instances, creating the APIs, operations, and products that are used by developers.
Developers - Authenticated developer portal users fall into this group. Developers are the customers that build applications using your APIs. Developers are granted access to the developer portal and build applications that call the operations of an API.
Guests - Unauthenticated developer portal users, such as prospective customers visiting the developer portal of an API Management instance fall into this group. They can be granted certain read-only access, such as the ability to view APIs but not call them.
What is an API gateway?
An API gateway sits between clients and services. It acts as a reverse proxy, routing requests from clients to services. It may also perform various cross-cutting tasks such as authentication, SSL termination, and rate limiting.
What are the 3 API gateway design patterns?
Gateway routing: Use the gateway as a reverse proxy to route requests to one or more backend services, using layer 7 routing. The gateway provides a single endpoint for clients, and helps to decouple clients from services.
Gateway aggregation: Use the gateway to aggregate multiple individual requests into a single request. This pattern applies when a single operation requires calls to multiple backend services. The client sends one request to the gateway. The gateway dispatches requests to the various backend services, and then aggregates the results and sends them back to the client. This helps to reduce chattiness between the client and the backend.
Gateway Offloading: Use the gateway to offload functionality from individual services to the gateway, particularly cross-cutting concerns. It can be useful to consolidate these functions into one place, rather than making every service responsible for implementing them.
What are some examples of functionality offloaded to an API gateway?
SSL termination
Authentication
IP allow/block list
Client rate limiting (throttling)
Logging and monitoring
Response caching
GZIP compression
Servicing static content
What are the event grid batched delivery?
Max events per batch - Maximum number of events Event Grid will deliver per batch. This number will never be exceeded, however fewer events may be delivered if no other events are available at the time of publish. Event Grid doesn’t delay events to create a batch if fewer events are available. Must be between 1 and 5,000.
Preferred batch size in kilobytes - Target ceiling for batch size in kilobytes. Similar to max events, the batch size may be smaller if more events aren’t available at the time of publish. It’s possible that a batch is larger than the preferred batch size if a single event is larger than the preferred size. For example, if the preferred size is 4 KB and a 10-KB event is pushed to Event Grid, the 10-KB event will still be delivered in its own batch rather than being dropped.
How to configure retry settings for event delivery?
Maximum number of attempts - The value must be an integer between 1 and 30. The default value is 30.
Event time-to-live (TTL) - The value must be an integer between 1 and 1440. The default value is 1440 minutes
When Event Grid can’t deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
What is Event grid dead lettering?
Event Grid dead-letters an event when one of the following conditions is met.
- Event isn’t delivered within the time-to-live period.
- The number of tries to deliver the event exceeds the limit.
What are the built in roles for access to events?
Event Grid Subscription Reader: Lets you read Event Grid event subscriptions.
Event Grid Subscription Contributor: Lets you manage Event Grid event subscription operations.
Event Grid Contributor: Lets you create and manage Event Grid resources.
Event Grid Data Sender: Lets you send events to Event Grid topics.
What are the permissions required for different event subscriptions?
System Topic: /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}
Custom Topic: /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.EventGrid/topics/{topic-name}