ychris78 commented on PR #7429:
URL: https://github.com/apache/kyuubi/pull/7429#issuecomment-4384477426

   > In practice, it's usually to use a gateway like nginx for HA of HTTP 
services.
   
     Thanks for the suggestion. I agree that a reverse proxy like nginx is a 
common approach for HTTP HA, but I think client-side service discovery via 
ZK/ETCD offers several unique advantages in Kyuubi's context:
                                                                                
                                                                                
                                                                                
                                                  
     1. No additional infrastructure required
     Kyuubi already relies on ZK/ETCD for Thrift frontend HA. Reusing the same 
service discovery infrastructure for REST means users don't need to deploy, 
configure, and maintain an extra nginx layer.
   
     2. No single point of failure
     With nginx, the gateway itself becomes a SPOF (unless you additionally set 
up nginx HA with keepalived, etc., which adds even more complexity). 
Client-side discovery eliminates this — each client independently discovers 
available endpoints.
   
     3. Dynamic topology without config changes
     When REST instances are added or removed, clients automatically pick up 
the change via the background refresher. With nginx, you'd need to update 
upstream configs and reload.
   
     4. Consistency with existing architecture
     Kyuubi's Thrift frontend already uses ZK-based service discovery 
(ServiceDiscovery). This PR follows the same pattern for REST, providing a 
consistent user experience, just like 
jdbc:hive2://zk1:2181,zk2:2181/;serviceDiscoveryMode=zooKeeper.
   
     5. Better suited for programmatic clients
     The kyuubi-rest-client is a Java library embedded in applications. 
Requiring those applications to go through nginx adds operational coupling. 
With this PR, they can self-discover endpoints with just ZK/ETCD addresses.
   
     6. The two approaches are not mutually exclusive
     This PR doesn't prevent users from using nginx. Users who prefer a gateway 
can still point the REST client at nginx. This simply provides a 
zero-extra-infrastructure option for the many users already running ZK/ETCD.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to