tejas.kumar
08/18/2026, 12:05 PMRocky
08/18/2026, 12:05 PMPREPARED) staying open after Flink job failures. This was addressed in Connector 1.2.8 by introducing sink.label-prefix. By setting a unique prefix, the connector can now automatically find and abort lingering transactions upon job restart.
3. Timeout Management: Newer versions (1.2.12+) allow you to configure sink.properties.prepared_timeout, giving you better control over how long transactions stay in a prepared state before timing out.
Guidance
* If you use the Flink Connector: Ensure you use version 1.2.8 or later and always set a sink.label-prefix. This is critical for stability and preventing "too many transactions" errors in StarRocks.
* If you use Kafka: This is often the "safer" route for high-volume streaming because Kafka handles the persistence. If Flink or StarRocks goes down, the data remains safely in Kafka without putting pressure on the source.
Recommendation: For most modern StarRocks deployments, the Flink–StarRocks Connector (v1.2.8+) is the preferred method because it is more efficient and easier to maintain within a Flink-centric pipeline. Only move to Kafka if you specifically need the buffering or multi-consumer capabilities it provides.
References
• faq/loading/Flink_connector_faq.md
• unloading/Flink_connector.md
• loading/Flink-connector-starrocks.mdtejas.kumar
08/18/2026, 12:25 PMRocky
08/18/2026, 12:26 PMload-url.
2. The FE selects a Backend (BE) to handle the data and sends an HTTP 307 Redirect back to Flink.
3. The Issue: By default, the FE redirects Flink to the Internal IP that the BE used to register with the cluster. If your Flink cluster cannot "see" that internal IP (because it's on a private network), the connection times out, and you see errors like None of hosts in load_url could be connected or Connect timed out.
──────────
How to Solve it (Routing & IP)
1. Use priority_networks
In your be.conf and fe.conf, you can set the priority_networks parameter. This forces StarRocks nodes to bind to a specific IP range. If your environment has a network interface that is accessible to Flink, ensure the CIDR matches that network.
conf
# Example: force binding to the 10.10.x.x network
priority_networks = 10.10.0.0/16
2. FQDN Mode (Recommended for K8s/Docker)
In recent versions, you can start StarRocks nodes with the flag --host_type FQDN. This causes the FE to redirect Flink using the hostname of the BE instead of its IP.
* Action: You must then ensure the Flink workers can resolve these hostnames (e.g., via DNS or by adding the BE hostnames and IPs to the /etc/hosts file of every Flink node).
3. Proxy/Load Balancer
If you are on Kubernetes, you can use a Proxy (like the starrocksFeProxySpec in the StarRocks Operator) to handle the redirection. The proxy can be exposed via a LoadBalancer, allowing Flink to communicate with a single stable entry point that handles the internal routing to the BEs.
──────────
Why Routine Load "Fixes" This
If routing is a major pain point for your infrastructure team, Routine Load is often the better choice because:
* Internal Communication: The Routine Load task runs inside the StarRocks BEs. It uses the internal cluster network to communicate between the FE and BE. It never has to deal with the "307 Redirect to an unreachable IP" issue because it's already "home."
* Simple External Edge: The only external networking you need to worry about is ensuring the StarRocks BEs can reach your Kafka brokers. Usually, it is easier to give a database cluster access to Kafka than to expose every single BE node's HTTP port to an external Flink cluster.
Summary of Guidance
* Stick with Flink if you can resolve the network routing (using FQDNs or a flat network/VPC peering). It provides more power.
* Switch to Kafka + Routine Load if your Flink and StarRocks clusters are in strictly isolated networks and you don't want to manage complex NAT/Gateway rules for every BE node-to-node connectivity.
References
• faq/loading/Flink_connector_faq.md
• quick_start/shared-data.md
• loading/StreamLoad.md
• administration/management/FE_configuration.md
References
• administration/management/FE_configuration.md
• administration/management/BE_configuration.md
• administration/management/monitoring/Monitor_and_Alert.md