🌍 Cloud Computing · subject
Cloud Computing Serverless and Application Services Syllabus
The Serverless and Application Services syllabus for Cloud Computing in full: 4 chapters and 15 topics, every one listed below, plus 50 Serverless and Application Services flashcards with answers.
Serverless and Application Services syllabus: all 4 chapters
Expand any chapter to see its topics and sub-topics.
-
Function as a Service
4 topics- FaaS Platforms
- Triggers and Event Sources
- Cold Starts and Performance
- Concurrency and Limits
-
Serverless Application Patterns
4 topics- Backend-for-Frontend (BFF)
- Fan-Out and Aggregation
- Step Functions and Workflow Orchestration
- Serverless Cost and Trade-offs
-
API Management
3 topics- REST and GraphQL APIs
- API Gateway Features
- API Versioning and Documentation
-
Application Integration Services
4 topics- Managed Message Queues (SQS, Service Bus)
- Notification Services (SNS, Pub/Sub)
- Event Buses and EventBridge
- Workflow Orchestration
Cloud Computing Serverless and Application Services flashcards — 50 questions with answers
What is Function-as-a-Service (FaaS)?
A serverless compute model where developers deploy individual functions that run in response to events. The provider fully manages provisioning, scaling, and infrastructure; you are billed only for actual execution time, not idle capacity.
Name the major FaaS platforms and their cloud providers.
AWS Lambda (AWS), Azure Functions (Microsoft Azure), Google Cloud Functions / Cloud Run functions (GCP), and Cloudflare Workers (Cloudflare, V8-isolate based).
In serverless, what does 'stateless' mean and why does it matter?
Each function invocation is independent and retains no guaranteed in-memory state between calls. Persistent state must be stored externally (database, cache, object store) because instances can be created or destroyed at any time.
What is a trigger (event source) in a FaaS platform?
A configured event that invokes a function. Examples: HTTP request via API Gateway, object upload to S3/Cloud Storage, message on a queue, database change stream, scheduled timer (cron), or a pub/sub notification.
Distinguish push-based from poll-based (pull) event sources in serverless.
Push-based sources (HTTP, SNS, EventBridge) invoke the function directly when an event occurs. Poll-based sources (SQS, Kinesis, DynamoDB Streams) require the platform to poll the source and batch records to invoke the function.
What is a serverless cold start?
The added latency incurred when a new function instance must be initialized from scratch: downloading code, starting the runtime/container, and running initialization code, because no warm instance is available to serve the request.
List the main phases contributing to a cold start.
1) Provision/download code and container, 2) Start the runtime environment, 3) Run static/init code (e.g., establishing DB connections, loading dependencies) before the handler executes. A warm start skips all of these.
Which factors increase cold-start latency?
Larger deployment package size, heavier runtimes (JVM/.NET vs. Node/Python/Go), more initialization code, VPC/ENI attachment, and more dependencies to load. Provisioned concurrency and lightweight runtimes reduce it.
What is provisioned concurrency (AWS Lambda) and what problem does it solve?
A feature that keeps a set number of function instances pre-initialized and ready to respond immediately, eliminating cold starts for latency-sensitive workloads. You pay for the reserved warm capacity even when idle.
Define concurrency in the context of FaaS.
The number of function instances executing simultaneously at a given moment. Each concurrent request is generally handled by its own instance (one request per instance in AWS Lambda).
State the formula relating concurrency to request rate and duration (Little's Law).
$$\text{Concurrency} = \text{RequestsPerSecond} \times \text{AvgDurationSeconds}$$ For example, $100 \text{ req/s} \times 0.2\text{ s} = 20$ concurrent instances.
What is reserved concurrency versus a regional concurrency limit in AWS Lambda?
The regional limit (default 1000) caps total concurrent executions across all functions in a region. Reserved concurrency carves out a guaranteed portion of that limit for a specific function (also capping that function to it).
What happens when a synchronous function invocation exceeds the concurrency limit?
The invocation is throttled and returns a 429 (TooManyRequests / rate exceeded) error. Asynchronous invocations are retried automatically, and poll-based sources retry based on their configuration.
What is the Backend-for-Frontend (BFF) pattern?
An architectural pattern where a dedicated backend service is built for each specific frontend (e.g., one for web, one for mobile). Each BFF aggregates and tailors downstream API responses to the exact needs of its client.
What problem does the BFF pattern solve?
It avoids a one-size-fits-all API that over- or under-serves clients. Each BFF shapes data, reduces round trips, and handles client-specific concerns (payload size, auth), decoupling frontend evolution from shared backend services.
What is the fan-out messaging pattern?
A single event or message is distributed to multiple consumers/subscribers in parallel, so many processors act on the same event simultaneously. Commonly implemented with SNS-to-SQS or a pub/sub topic with multiple subscribers.
Describe the fan-out/fan-in (scatter-gather) pattern.
Fan-out dispatches work to many parallel workers; fan-in aggregates their individual results back into a single combined result. Used for parallel processing of large jobs, then collecting outputs (e.g., Step Functions Map + aggregation).
What is a common serverless implementation of fan-out on AWS?
Publish a message to an SNS topic that has multiple SQS queues (or Lambda functions) subscribed. Each subscriber receives a copy of the message and processes it independently and in parallel.
What are AWS Step Functions?
A serverless workflow orchestration service that coordinates multiple services/functions into state machines defined in Amazon States Language (JSON). It manages sequencing, branching, parallelism, retries, and error handling.
Name common state types in an AWS Step Functions state machine.
Task (do work), Choice (branching), Parallel (concurrent branches), Map (iterate over a collection), Wait (delay), Pass (transform/pass data), Succeed, and Fail (terminal states).
Show the other 30 Serverless and Application Services flashcards
Compare Standard and Express workflows in AWS Step Functions.
Standard: long-running (up to 1 year), exactly-once, full execution history, priced per state transition. Express: high-volume, short-running (up to 5 min), at-least-once, priced by number and duration of executions; cheaper for high throughput.
Contrast orchestration and choreography in workflow design.
Orchestration uses a central coordinator (e.g., Step Functions) that explicitly directs each step. Choreography has no central controller; services react to events independently via events/messages. Orchestration is easier to monitor; choreography is more loosely coupled.
List the main cost components of a FaaS platform like AWS Lambda.
1) Number of requests (invocations), and 2) Compute duration measured in GB-seconds (allocated memory times execution time). Additional costs may include provisioned concurrency and data transfer.
Give the formula for AWS Lambda compute cost in GB-seconds.
$$\text{GB\text{-}s} = \frac{\text{Memory}_{MB}}{1024} \times \text{Duration}_{s} \times \text{Invocations}$$ Total cost = (GB-s $\times$ price per GB-s) + (invocations $\times$ price per request).
When is serverless (FaaS) most cost-effective versus always-on servers?
Serverless wins for spiky, unpredictable, or low-average traffic because you pay nothing when idle. Steady, high-utilization, sustained workloads often become cheaper on reserved/always-on compute, since per-invocation pricing accumulates.
List key trade-offs (downsides) of serverless architectures.
Cold-start latency, execution time limits, vendor lock-in, harder local testing/debugging, statelessness constraints, per-invocation cost at scale, limited control over runtime, and distributed-system complexity.
Contrast REST and GraphQL APIs.
REST exposes multiple endpoints, each returning fixed resource representations, and can over-/under-fetch. GraphQL exposes a single endpoint where clients query exactly the fields they need in one request, reducing over-fetching but adding server-side complexity and harder HTTP caching.
What are the core REST architectural constraints?
Client-server separation, statelessness, cacheability, uniform interface, layered system, and (optionally) code-on-demand. Resources are identified by URIs and manipulated via standard HTTP methods.
Map common HTTP methods to CRUD operations in REST.
POST = Create, GET = Read (safe, idempotent), PUT = Replace/Update (idempotent), PATCH = Partial update, DELETE = Delete (idempotent). GET, PUT, DELETE are idempotent; POST is not.
What are the three GraphQL root operation types?
Query (read data), Mutation (write/modify data), and Subscription (real-time updates over a persistent connection, typically WebSockets).
What is the N+1 problem in GraphQL and how is it mitigated?
Resolving a list plus a related field triggers 1 query for the list and N queries for each item's relation. It is mitigated with batching/caching via a DataLoader that coalesces requests into a single batched fetch.
What is an API Gateway?
A managed service that sits in front of backend services as a single entry point, handling request routing, authentication/authorization, rate limiting/throttling, request/response transformation, caching, and protocol translation.
List key features provided by a managed API Gateway.
Routing, authN/authZ (API keys, JWT, IAM, OAuth), throttling/rate limiting, caching, request/response mapping/validation, usage plans, TLS termination, WAF integration, and monitoring/logging.
Compare REST APIs and HTTP APIs in Amazon API Gateway.
REST APIs offer richer features (API keys, usage plans, request validation, WAF, private endpoints) at higher cost. HTTP APIs are lower-latency, cheaper, and simpler, supporting JWT auth and Lambda/HTTP integrations but fewer advanced features.
What is throttling in an API Gateway and how is it typically configured?
Limiting the rate of requests to protect backends. Usually configured with a steady-state rate limit (requests per second) plus a burst limit (bucket capacity) using a token-bucket algorithm; excess requests receive HTTP 429.
Explain the token-bucket algorithm used for rate limiting.
A bucket holds up to $b$ tokens (burst capacity) and refills at rate $r$ tokens/sec. Each request consumes a token; if the bucket is empty the request is throttled. It allows short bursts up to $b$ while enforcing average rate $r$.
What are common API versioning strategies?
URI path versioning (/v1/users), query-parameter versioning (?version=1), custom header versioning (Api-Version: 1), and media-type/content-negotiation versioning (Accept: application/vnd.api.v1+json).
Why version an API, and what is a breaking change?
Versioning lets you evolve an API without breaking existing clients. A breaking change alters the contract in a backward-incompatible way (removing/renaming fields, changing types, altering required params, changing response structure).
What is OpenAPI (Swagger) and what is it used for?
A standard, language-agnostic specification (YAML/JSON) that describes REST APIs: endpoints, methods, parameters, request/response schemas, and auth. It enables auto-generated documentation, client SDKs, server stubs, and request validation.
What is a managed message queue and what pattern does it enable?
A fully managed service (e.g., Amazon SQS, Azure Service Bus) that stores messages between producers and consumers, enabling asynchronous, decoupled point-to-point communication where each message is processed by one consumer.
Compare Amazon SQS Standard and FIFO queues.
Standard: nearly unlimited throughput, best-effort ordering, at-least-once delivery (possible duplicates). FIFO: strict ordering within a message group, exactly-once processing (deduplication), but limited throughput (300 msg/s, up to 3000 with batching).
What is the SQS visibility timeout?
The period after a consumer receives a message during which the message is hidden from other consumers. If not deleted before the timeout expires, the message becomes visible again for reprocessing (default 30s).
What is a dead-letter queue (DLQ)?
A separate queue where messages are routed after failing to be processed successfully a configured number of times (max receive count). It isolates poison/problematic messages for later inspection without blocking the main queue.
Contrast message queues with pub/sub notification services.
A queue delivers each message to exactly one consumer (point-to-point, competing consumers). Pub/sub delivers each message to all subscribers of a topic (one-to-many broadcast/fan-out).
What is Amazon SNS and how does it work?
A managed pub/sub notification service. Publishers send messages to a topic; SNS pushes each message to all subscribers of that topic. Subscribers can be SQS queues, Lambda functions, HTTP(S) endpoints, email, or SMS.
What is Google Cloud Pub/Sub and how does its delivery model differ from plain SNS?
A managed messaging service combining pub/sub with durable message storage. Unlike push-only SNS, Pub/Sub decouples topics from subscriptions: each subscription retains messages and supports both pull and push delivery with at-least-once guarantees and acknowledgements.
What is an event bus, and what is Amazon EventBridge?
An event bus is a router that receives events and delivers them to targets based on rules. EventBridge is AWS's serverless event bus that ingests events from AWS services, SaaS partners, and custom apps, then routes them via content-based rule matching.
How does EventBridge route events, and how does this differ from SNS?
EventBridge uses rules with content-based filtering (event patterns matching JSON fields) to route to many targets, plus a schema registry and archive/replay. SNS routes by topic subscription with simpler attribute filtering and no built-in content routing or replay.
When would you choose SQS vs. SNS vs. EventBridge?
SQS: decouple with a durable queue and one consumer per message. SNS: high-throughput fan-out/broadcast to many subscribers. EventBridge: event-driven routing with rich content-based filtering, schema management, and many SaaS/AWS integrations.
What delivery guarantee levels exist in messaging, and what do they mean?
At-most-once (may lose messages, no duplicates), at-least-once (never lost but possible duplicates, requires idempotent consumers), and exactly-once (each message processed precisely once, hardest and costliest to guarantee).
Cloud Computing Serverless and Application Services FAQ
What is in the Cloud Computing Serverless and Application Services syllabus?
Cloud Computing Serverless and Application Services is split into 4 chapters: Function as a Service, Serverless Application Patterns, API Management and Application Integration Services. Together they contain 15 topics.
How many chapters are in Cloud Computing Serverless and Application Services?
4 chapters, containing 15 topics. The largest chapter is Function as a Service, with 4 topics.
Are there flashcards for Cloud Computing Serverless and Application Services?
Yes — a 50-card Serverless and Application Services deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.