Gateways in EMR Serverless StarRocks let you route queries to dedicated Frontend (FE) node groups, isolating workloads across business scenarios in storage-compute separation environments.
Prerequisites
Before you begin, make sure you have:
A storage-compute separation instance. See Create an instance.
An instance version where the last three digits are 1.7.9 or higher, for example,
3.3.8-1.94-1.7.10.
Key concepts
Default gateway: Created automatically when you create an instance. Handles all queries that arrive through implicit (unspecified) gateways. Automatically associates with all FE nodes at initialization and picks up new FE nodes after scaling out. The default gateway cannot be deleted.
Custom gateway: A named gateway you create to associate a subset of FE nodes with a specific business scenario. You can modify and delete custom gateways.
When to create a custom gateway
The default gateway works for most use cases. Consider creating a custom gateway when:
Workload isolation: High-concurrency analytical queries are interfering with time-sensitive operational queries.
Performance optimization: Instance load is high and critical business queries need a dedicated set of FE nodes.
Independent scaling: You have scaled out FE nodes and want to assign the additional capacity to a specific business application.
View the default gateway
Log on to the E-MapReduce console.
In the left-side navigation pane, select EMR Serverless > StarRocks.
In the top menu bar, select the region.
Click the name of the target instance.
On the Instance Details page, go to the FE Details section to view the default gateway.
Parameter Description Internal endpoint The internal access endpoint for applications within the same Virtual Private Cloud (VPC). Click View PrivateZone to view DNS records. Click Enable SLB to enable load balancing using Server Load Balancer (SLB) with the slb.s1.smallinstance type. After enabling SLB, click View SLB to open the SLB console.NoteEnabling SLB incurs fees. See CLB Billing overview. Once enabled, you cannot switch back to PrivateZone.
Public endpoint The endpoint for public network access. Click Enable Access over Internet to create a Classic Load Balancer (CLB) instance and expose the gateway to the public network. NoteEnabling public access incurs CLB fees. See CLB Billing overview.
Write to Leader Only Controls whether the Leader node handles write requests only. Disabled: The Leader node processes both write and query requests. Enabled: The Leader node handles only write requests; query requests are distributed to Follower nodes. Enable this in high-concurrency write scenarios to reduce pressure on the Leader node. Network type The network connection type of the gateway. Number of associated FEs The number of FE nodes associated with this gateway. The default gateway automatically associates with all existing FE nodes and picks up new nodes after you scale out.
Create a custom gateway
Creating a custom gateway may cause brief interruptions to some queries. Perform this operation during off-peak hours to minimize impact.
Creating a custom gateway also creates a CLB instance, which incurs fees. See CLB Billing overview.
Before creating a gateway, make sure you have enough FE nodes. If the current FE node count is insufficient, scale out first. See Scale in or out an instance.
On the Instance Details page, in the Gateway Information section, click Enable SLB.
In the dialog box, click OK.
In the Gateway Information section, click Create Gateway.
In the Create Gateway dialog box, configure the following parameters.
Parameter Description Gateway name A name for the gateway, used for identification and management. Assigned node count The number of FE nodes to assign to this gateway. Nodes are assigned in increments of 2. For example, if the default gateway has 5 FE nodes and you scaled out by 2, you can assign 2 of those nodes to the new gateway for independent resource management. Click OK.
Modify a custom gateway
On the Instance Details page, in the Gateway Information section, find the target gateway and click Modify Gateway.
In the dialog box, update the Gateway name or Assigned node count, then click OK.
Delete a custom gateway
Deleting a gateway disconnects all clients connected to it. All tasks submitted through those connections will fail. Verify that no business traffic is using the gateway before proceeding.
Only custom gateways can be deleted. The default gateway cannot be deleted.
On the Instance Details page, in the Gateway Information section, find the target gateway and click Delete Gateway.
In the dialog box, click OK.