Services, communication and consensus
Every question from this chapter’s lessons, grouped by the lesson that teaches it. Answer each one right to finish; you can try again whenever you like.
0 of 17 answered right
8.1 Transport protocols, gRPC and service meshes
0 of 4 answered rightQuestion 1
In Protocol Buffers, how many bytes does field number 1 holding the integer 150 take?
Answers within 1% count, in any unit you choose.
Question 2
With HTTP/1.1 pipelining, a client sends three requests on one connection, and the first is slow. Why do the other two responses wait?
Question 3
Match each part of an Istio service mesh to its role.
Question 4
After moving to HTTP/2, many concurrent requests share one connection. On a lossy network, all of them stall together whenever a packet is lost. Why?
8.2 Circuit breakers, retries and bulkheads
0 of 5 answered rightQuestion 5
An orchestrator has 100 worker threads, one per call in flight. Its recommendations dependency slows from 20 ms to 4 seconds per call. How many calls per second to it are enough to occupy all 100 threads?
calls/s
Answers within 2% count.
Question 6
What moves an open circuit breaker to half-open, and what decides where it goes next?
Question 7
A failing service normally receives 8,000 requests per second. Every call now fails, and each client retries up to 3 times. What load does the failing service see?
RPS
Answers within 2% count.
Question 8
Five layers of services each call the next, and the last one queries a database. Each layer tries every call three times when the call fails. If the database is failing, how many times its normal load can it receive?
×
Answers within 1% count.
Question 9
A slow recommendations service keeps taking all of the orchestrator’s threads, and checkout stops working. Which pattern keeps checkout running even while recommendations is slow?
8.3 Distributed transactions: two-phase commit and sagas
0 of 4 answered rightQuestion 10
What is the core problem with two-phase commit, in Gray and Lamport’s words?
Question 11
A checkout saga creates an order, reserves stock, then fails to charge the card. Put what happens in order.
Question 12
Match each kind of saga step to its definition.
Question 13
Other transactions can see an order while its saga is still running. Which countermeasure warns them that the order is mid-saga?
8.4 Consensus and leader election: Raft and Paxos
0 of 4 answered rightQuestion 14
A 5-server Raft cluster splits into 2 servers (including the leader) and 3 servers. What happens to writes on each side?
Question 15
How many servers does a Raft cluster need to keep working with any 2 of them down?
servers
Answers within 1% count.
Question 16
Why does Raft choose each server’s election timeout at random from a range such as 150–300 ms?
Question 17
How does Raft make sure a newly elected leader already holds every committed entry?