Simon Paradis
04/28/2026, 2:38 PMRocky
04/28/2026, 2:39 PMcurl or loading tools to the FE Proxy service (port 8080).
* For Queries (SQL): Point your BI tools, applications, or MySQL clients to the FE service (port 9030).
* If you need load balancing for queries across multiple FEs, you should use a dedicated MySQL-aware load balancer like ProxySQL, a cloud-native LoadBalancer (like AWS ELB/NLB) pointing to port 9030, or the JDBC loadbalance:// connection string.
References
• introduction/Architecture.md
• administration/management/resource_management/Load_balance.md
• faq/operation_maintenance_faq.mdSimon Paradis
04/28/2026, 2:46 PMRocky
04/28/2026, 2:47 PMSELECT queries do not involve the "307 Redirect" to a BE, the proxy simply acts as a pass-through.
* When to go direct: If your query client is inside the same network as the StarRocks cluster (e.g., another pod in the same K8s namespace), you should steer them directly to the FE Service (port 8030) to avoid the unnecessary overhead and latency of an extra Nginx hop.
2. For MySQL Protocol Clients
Do not use the FE Proxy.
The FE Proxy is an Nginx-based HTTP proxy. It does not support the MySQL wire protocol. Even if your client is "sending queries," if it's doing so via a MySQL driver (JDBC, Go-MySQL, etc.), it must connect directly to the FE Service on port 9030.
Key Differences at a Glance
Client Type | Direct to FE Service (Port 8030/9030) | Via FE Proxy (Port 8080)
Stream Load (HTTP) | Fails if client is outside K8s (due to 307 Redirect to internal BE IPs). | Recommended for external clients.
HTTP SQL API | Best for internal clients (low latency). | Good for external clients if already exposed.
MySQL Protocol | Required (Port 9030). | Incompatible (Protocol mismatch).
Summary Recommendation
If you have query clients that strictly use the HTTP SQL API and they are coming from a network where the FE's internal IPs are unreachable, steering them to the FE Proxy is a valid and supported approach. For all other query scenarios, especially standard SQL tools using MySQL drivers, you must point them directly to the FE service.
References
• sql-reference/http_sql_api.md
• administration/management/resource_management/Load_balance.md
• introduction/Architecture.md
References
• administration/management/resource_management/Load_balance.md
• introduction/Architecture.md
• faq/operation_maintenance_faq.md
• administration/management/logs.md