Q48: How do you scale GraphQL Subscriptions across distributed clusters?
Single-server WebSocket instances cannot scale horizontally alone. Distributed subscriptions require a pub/sub backbone (e.g., Redis Pub/Sub, NATS, Kafka). When an event occurs on any node, it publishes to the broker, which broadcasts the event to all connected WebSocket servers holding active subscriptions.
Key Takeaways
Scaling subscriptions horizontally requires central pub/sub message brokers (Redis/Kafka).
Knowledge Check
Which component coordinates real-time event distribution across multiple stateless GraphQL server nodes?