0
0
HLDsystem_design~20 mins

gRPC for internal services in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
gRPC Internal Services Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why choose gRPC over REST for internal services?

Consider a company deciding between gRPC and REST for communication between its internal microservices. Which of the following is the main advantage of using gRPC in this context?

AgRPC uses HTTP/2 which supports multiplexing and reduces latency compared to REST over HTTP/1.1
BgRPC only supports synchronous calls, which simplifies service design
CgRPC requires no schema definition, so services can evolve independently without coordination
DgRPC messages are always human-readable JSON, making debugging easier than REST
Attempts:
2 left
💡 Hint

Think about protocol efficiency and network features.

Architecture
intermediate
2:00remaining
Designing service communication with gRPC

You are designing an internal system with multiple microservices. Which architectural pattern best fits gRPC usage for service-to-service communication?

AUse gRPC to expose public APIs directly to external clients
BUse gRPC for synchronous request-response calls between services with defined protobuf contracts
CUse gRPC as a replacement for database queries within services
DUse gRPC only for asynchronous event streaming and avoid request-response patterns
Attempts:
2 left
💡 Hint

Consider typical gRPC usage patterns inside microservice architectures.

scaling
advanced
2:00remaining
Scaling gRPC services under high load

Your internal gRPC service is experiencing high traffic and latency spikes. Which approach best helps scale the service efficiently?

ASwitch to REST APIs to reduce overhead from HTTP/2 multiplexing
BIncrease the size of protobuf messages to reduce the number of calls
CImplement client-side load balancing with multiple service instances and use connection pooling
DDisable streaming features to simplify the protocol
Attempts:
2 left
💡 Hint

Think about how gRPC clients can distribute load and reuse connections.

tradeoff
advanced
2:00remaining
Tradeoffs of using gRPC streaming internally

What is a key tradeoff when using gRPC streaming for internal service communication?

AStreaming reduces latency but increases complexity in error handling and resource management
BStreaming always improves throughput without any drawbacks
CStreaming eliminates the need for service discovery
DStreaming requires all clients to be implemented in the same programming language
Attempts:
2 left
💡 Hint

Consider the operational challenges of long-lived connections.

estimation
expert
2:00remaining
Estimating capacity for gRPC internal services

You expect 10,000 requests per second to your internal gRPC service. Each request takes 5ms to process on average. How many service instances do you need to handle the load without queuing, assuming each instance can handle requests sequentially?

AAt least 200 instances
BAt least 500 instances
CAt least 1000 instances
DAt least 50 instances
Attempts:
2 left
💡 Hint

Calculate how many requests one instance can handle per second, then divide total requests by that.