Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your engineering team is designing a high-throughput, real-time analytics microservice on Google Kubernetes Engine (GKE) that communicates with internal data ingestion workers. The API architecture must meet the following requirements:
Which API protocol and contract specification should your team choose?
gRPC is a high-performance, open-source universal Remote Procedure Call (RPC) framework built on top of HTTP/2 transport. By default, it uses Protocol Buffers (.proto files) as its Interface Definition Language (IDL) to define both the service methods and the strongly typed binary payload schemas.
stream keyword on both request and response messages), allowing clients and servers to read and write messages in two independent streams over a single persistent connection..proto file defines RPC signatures, parameter types, and return messages in one language-neutral contract. Developers compile this file with protoc to automatically generate strongly typed client stubs and server skeletons across languages such as Go, Java, Python, and C++.proto3 messages enable backward and forward compatibility as services evolve.Unlike HTTP REST APIs governed by OpenAPI documents and JSON payloads, gRPC with Protocol Buffers is purpose-built for low-latency internal microservice communication requiring high throughput and true full-duplex streaming.
In a unary RPC, the client sends a single request message to the server and receives a single response message back, functioning like a standard synchronous function call. HTTP/JSON transcoding (provided by API Gateway or Extensible Service Proxy) translates incoming RESTful JSON over HTTP requests into backend gRPC calls based on mapping annotations in the .proto file.
500 Internal Server Error if exceeded.Get or Create), not continuous streaming.Your backend was a unary gRPC service hosted on Cloud Run that needed to expose RESTful JSON endpoints to external web browser clients without rewriting the backend.
For internal GKE microservice-to-microservice communication, services should call each other directly using native gRPC bidirectional streaming over HTTP/2 rather than transcoding through JSON.
HTTP REST over HTTP/2 combines resource-oriented API design (using standard HTTP verbs such as GET, POST, PUT, and DELETE) with the multiplexed transport capabilities of HTTP/2. An OpenAPI specification (written in YAML or JSON) documents the API surface, including endpoint paths, query parameters, request headers, and JSON response models.
application/json), which is a text-based format. Parsing and serializing text-based JSON consumes substantially more CPU and bandwidth than binary Protocol Buffers, especially under high-volume microservice workloads.The API needed to expose public, human-readable JSON endpoints to web browsers or third-party external consumers requiring only unary request-response or simple server-streaming interactions.
When full-duplex bidirectional streaming is required in web-facing architectures that cannot use gRPC, developers typically use WebSockets rather than standard HTTP REST endpoints.
HTTP/1.1 REST is the traditional request-response web architecture described using an OpenAPI JSON or YAML document. Developers use Connection: Keep-Alive headers to reuse underlying TCP sockets across sequential HTTP calls and encode streamed messages inside a JSON array (application/json).
The system had to integrate with legacy HTTP/1.1-only infrastructure or external clients that only support standard unary JSON requests without HTTP/2 capabilities.
Even when modern HTTP/1.1 connection pools reuse TCP sockets, they cannot match the HTTP/2 multiplexing, flow control, and binary framing that make gRPC effective for high-throughput internal services.
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 Validated