Lesson 14 · Senior NATS practice
Queue groups, scaling, and consumer backpressure
How to reason about push vs pull, queue-group scaling, in-flight pressure, and when one subscriber shape stops fitting the workload.
Your win: explain how queue groups scale work, why push and pull are different control models, and how a senior engineer reads backpressure instead of only counting subscriber replicas.
The tempting wrong question
When a NATS consumer is too slow, the first instinct is usually: “Should we add more replicas?” Sometimes that is the right move. But if that is the only question you ask, you will miss the real system shape.
The stronger question is: what is the actual bottleneck — handler cost, downstream slowness, in-flight pressure, ordering constraints, or the fact that the workload wants pull-based control instead of server-driven push delivery?
Why the zeus pull consumer matters so much
The repo is mostly push queue-group JetStream consumers. That makes the zeus activity-log pull consumer especially useful as a teaching contrast. It shows a different philosophy: do not let the server push each event as fast as possible; let the client choose fetch size, batch shape, and pace.
That difference is not cosmetic. Push is a great fit for straightforward event handling. Pull is better when the consumer wants tighter control over batch work, pacing, and operational pressure. A senior engineer should be able to explain that distinction clearly, not just repeat the words “push” and “pull.”
MaxAckPending, downstream slowness, or whether the workload should be pull-based instead.
Consumers with a flow-control lens
Revisit the official consumer docs and compare them against the repo’s push-default shape and the zeus pull path.
Check yourself (from memory)
Q1. What is the strongest senior reading of queue-group scaling?
Sources. Official JetStream consumer docs; repo NATS map.