10.9.2 – When to Use REST vs Native Clients
Module: Section 10 – Kafka Ecosystem & Tools
Section: 10.9 – Kafka REST Proxy
Goal: Choose between REST Proxy and native clients
Decision Matrix
| Scenario | Recommendation |
|---|---|
| Python/Node.js app | Native client (confluent-kafka-python, kafkajs) |
| Browser app | REST Proxy (CORS support) |
| Quick prototype | REST Proxy |
| Production pipeline | Native client |
| Firewall restrictions | REST Proxy |
| High throughput | Native client |
REST Proxy Limitations
- No consumer groups: Each request creates new consumer
- No exactly-once: At-least-once only
- No transactions: No multi-message atomicity
- Higher latency: HTTP overhead
Key Takeaways
- Prototyping: REST Proxy is great
- Production: Native clients preferred
- Browsers: REST Proxy only option
- Performance: Native clients 10x faster
What's Next?
Next Module: 10.9.3 – Producing Messages via REST