Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Cloud Digital Leader practice bank has an additional 3,070 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A global retail company is modernizing its real-time data pipeline. Currently, its checkout application sends transaction data directly to downstream inventory and analytics systems using synchronous calls. During peak holiday sales, slowdowns in the analytics database cause the checkout application to freeze, and adding new downstream applications requires risky updates to the checkout code.
The company wants to implement Pub/Sub to ingest checkout events and meet the following requirements:
How does Pub/Sub's design satisfy these data ingestion requirements?
Traditional on-premises message queues and partition-based streaming platforms (such as Apache Kafka or Pub/Sub Lite) organize data streams into discrete partitions or centralized first-in-first-out (FIFO) queues. In these models, administrators often must pre-plan capacity and configure the number of partitions in advance, or rely on a central process to sequence imperative commands in strict order before delivering them to consumers.
The retail company explicitly wants to scale automatically across global regions without manually managing partitions. Standard Pub/Sub does not use partitions; instead, it automatically scales topic capacity on demand and uses per-message parallelism, leasing individual messages to subscriber clients. Furthermore, relying on a centralized process to enforce strict FIFO command ordering creates a single point of failure and limits horizontal scalability during traffic spikes.
This option would be relevant if the organization were deploying a self-managed Apache Kafka cluster where engineers manually configure topic partitions, or implementing an on-premises FIFO message queue where a centralized broker sequences imperative commands.
Instead of sending imperative commands through a central bottleneck, event-driven architectures on Pub/Sub broadcast immutable event data (what occurred) and maximize subscriber throughput via per-message parallelism. If regional ordering is ever needed in Pub/Sub, it is handled via ordering keys rather than manual partition management.
Synchronous remote procedure calls (RPCs) represent a direct, tightly coupled communication pattern where a calling application sends a request to a remote service and blocks its own execution until it receives a confirmed response. In an RPC-based architecture, the producer and consumer must both be online, healthy, and responsive at the exact same moment for a transaction to succeed.
Relying on synchronous RPCs directly contradicts how Pub/Sub operates and recreates the exact architectural bottleneck the retail company is trying to eliminate. If the checkout service had to wait for every downstream inventory and analytics database to receive and process an event before completing a transaction, any latency spike or failure in the analytics layer would immediately cause the checkout application to hang or fail during peak holiday traffic.
This pattern would be appropriate if the company were designing a tightly coupled, request-response microservice interaction where the upstream application immediately required calculated data back from the downstream service before showing a confirmation screen to the user.
While Pub/Sub uses standard gRPC and REST APIs under the hood for transport between a client and the Pub/Sub service itself, the architectural integration between publishers and subscribers is strictly asynchronous. Publishers broadcast events to a topic without waiting for subscribers to consume them.
Client-to-server communication platforms—such as Firebase Cloud Messaging (FCM) and Firebase Realtime Database—are specialized services designed to maintain persistent connections with millions of end-user devices, such as smartphones and web browsers. They synchronize application state in real time and push notifications directly to client interfaces.
Pub/Sub is architected specifically for backend service-to-service communication and enterprise data integration pipelines, rather than direct communication with end-user mobile or web client devices. Additionally, Pub/Sub never bypasses subscriptions; a valid subscription resource is always required to represent the stream of messages flowing from a topic to a consuming backend application (whether delivered via pull or push webhooks).
This description would be accurate if the company were implementing Firebase Cloud Messaging or Firebase Realtime Database to synchronize live shopping cart states or send promotional push notifications directly to customers' mobile apps.
Organizations frequently combine these tools in a multi-tier architecture: a mobile app communicates with a backend checkout service using Firebase or standard web APIs, and that backend service then acts as a publisher to forward the resulting server events into Pub/Sub for downstream stream processing.
Pub/Sub is a fully managed, globally distributed messaging service designed for event-driven architectures and real-time data ingestion pipelines. In this model, applications that generate data act as publishers, sending messages to a shared, named resource called a topic. Downstream applications that need to process the data act as subscribers, creating a subscription to that topic to receive messages asynchronously.
By replacing rigid, direct point-to-point connections with an asynchronous publish-and-subscribe pattern, the organization eliminates single points of failure and increases the overall flexibility and robustness of its data pipeline. Publishers and subscribers operate and scale completely independently.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated