Hi Everyone! We've recently been evaluating StarR...
# questions-and-troubleshooting
a
Hi Everyone! We've recently been evaluating StarRocks as our low-latency data store and are testing the Spark Connector for data ingestion. However, we're encountering some issues that we could use help with. Environment Details: StarRocks Version: 3.5 Code: from pyspark.sql import SparkSession spark = SparkSession \ .builder \ .appName("StarRocks Example") \ .getOrCreate() data = [(1, "starrocks", 100), (2, "spark", 100)] df = spark.createDataFrame(data, ["id", "name", "score"]) df.write.format("starrocks") \ .option("starrocks.fe.http.url", "https://my_starrocks_instance.cloud:443") \ .option("starrocks.fe.jdbc.url", "jdbc:mysql://my_starrocks_instance:30930") \ .option("starrocks.table.identifier", "test_db.score_board") \ .option("starrocks.user", "user") \ .option("starrocks.password", "password") \ .mode("append") \ .save() ERROR-1 - Caused by: java.lang.RuntimeException: com.starrocks.data.load.stream.exception.StreamLoadFailException: Stream load failed because of error, db: test_db, table: score_board, label: spark-718edde1-c330-4398-8a29-ce9a85f5728c, responseBody: { "Status": "FAILED", "Message": "class com.starrocks.common.DdlException: There is no 100-continue header" } errorLog: null at com.starrocks.data.load.stream.v2.StreamLoadManagerV2.AssertNotException(StreamLoadManagerV2.java:427) at com.starrocks.data.load.stream.v2.StreamLoadManagerV2.flush(StreamLoadManagerV2.java:355) at com.starrocks.connector.spark.sql.write.StarRocksDataWriter.commit(StarRocksDataWriter.java:90) ... 29 more Caused by: com.starrocks.data.load.stream.exception.StreamLoadFailException: Stream load failed because of error, db: test_db, table: score_board, label: spark-718edde1-c330-4398-8a29-ce9a85f5728c, responseBody: { "Status": "FAILED", "Message": "class com.starrocks.common.DdlException: There is no 100-continue header" } ERROR -2 - : java.lang.RuntimeException: Failed to probe transaction load for https://my_starrocks_instance:443 Caused by: java.net.UnknownHostException: starrocks-fe-0.starrocks-fe-search.my_starrocks_instance.svc.cluster.local: Name or service not known
a
You need to add
100-continue
in the http header
image.png
a
tried adding this option, but ended up with the same error - .option("starrocks.write.properties.expect", "100-continue") \
: java.lang.RuntimeException: Failed to probe transaction load for https://my_starrocks_instance:443 Caused by: java.net.UnknownHostException: starrocks-fe-0.starrocks-fe-search.my_starrocks_instance.svc.cluster.local: Name or service not known
p
s
@Pham Nguyen - Enabling this means will all the data we push via spark will go through the proxy pod??
@Rocky - can you help with my question
r
I'd be happy to help! What's your question about StarRocks?
s
@Rocky Will enabling FEProxy for external stream load will that put load on that pod if the data is huge
r
Yes, enabling FEProxy for external Stream Loads will put a significant load on that pod if the data volume is large. Here is how the load is distributed and why the FEProxy becomes a bottleneck: 1. Data Path through the Proxy When you use FEProxy (an Nginx-based reverse proxy), the entire data payload for a Stream Load job flows through it: * Initial Request: Your client sends the data to the FEProxy. * Redirection: The FEProxy forwards the request to a StarRocks FE. The FE responds with an HTTP 307 Redirect containing the address of a Backend (BE) node. * Proxying to BE: Because external clients usually cannot reach internal BE IP addresses directly, the FEProxy intercepts this 307 redirect and proxies the entire data stream from the client to the specific BE. 2. Resource Impact on the Pod Because the proxy acts as a "man-in-the-middle" for the data, a "huge" data load will impact the pod in the following ways: * Network Bandwidth: The pod must handle double the traffic (ingress from the client and egress to the BE). If you have multiple large concurrent loads, the pod's network interface can become a bottleneck. * CPU Usage: Nginx requires CPU to process HTTP packets, manage connections, and potentially handle SSL/TLS encryption/decryption. * Disk I/O: By default, Nginx may buffer large request bodies to disk (
client_body_temp_path
) if they exceed the memory buffer size. This can lead to disk pressure and increased latency. * Memory: While Nginx is memory-efficient, high concurrency and large buffers will increase the pod's memory footprint. 3. Recommendations If you expect very large data volumes, consider these optimizations: * Scale the Proxy: Increase the
replicas
and resource
limits
(CPU/Memory) for the FEProxy in your Helm values or
StarRocksCluster
CRD. * Adjust Nginx Buffering: Ensure the pod has fast local storage (like an SSD-backed emptyDir) if Nginx needs to buffer large payloads to disk. * Direct BE Access (Alternative): If possible, allow your client to reach the BE nodes directly (e.g., via a VPN or by assigning LoadBalancers to the BEs). This bypasses the FEProxy for the data transfer part of the Stream Load, though it is more complex to manage in Kubernetes. * Compression: Enable compression at the source (e.g.,
curl -H "compression: gzip"
) to reduce the amount of data the proxy has to pass through the proxy. Summary: The FEProxy is a convenient way to solve connectivity issues, but it is not a "zero-copy" redirect; it is a full data proxy and will scale its resource consumption linearly with the amount of data you load. References • quick_start/helm.md • administration/management/FE_configuration.md • loading/StreamLoad.md • sql-reference/sql-statements/loading_unloading/STREAM_LOAD.md