Spring / Spring gRPC Interview Questions
When would you choose client streaming over unary calls in a Spring service?
Client streaming fits scenarios where the client needs to send a sequence of related items and only cares about a single aggregated response at the end - for example, uploading chunks of a large file, or submitting a batch of telemetry events - rather than the server responding to each item individually.
Using client streaming avoids the overhead of issuing many separate unary calls (each with its own connection-level bookkeeping and response round trip) and lets the server process items incrementally as they arrive, only replying once with a summary such as a total count, checksum, or confirmation ID after the client signals it is done sending.
More Related questions...