Architecture overview
Before creating a BYOC deployment, familiarize yourself with the following architecture. In the BYOC environment, the entire data plane is deployed in the user’s space. To manage the RisingWave clusters within this environment, we deploy two key services for operation delegation:- Agent Service: This service manages Kubernetes (K8s) and cloud resources. It handles tasks such as managing RisingWave Pods, storage services (including AWS S3, GCS, and Azure Blob Storage), IAM roles/accounts associated with the RisingWave cluster, network endpoints, etc.
- RWProxy: This is a TCP proxy that routes SQL statements from the control plane to the appropriate RisingWave instances. Control plane will issue SQL queries to retrieve cluster metadata and health status.
Prerequisites
BYOC uses therwc (RisingWave Cloud CLI) to provision and manage environments. Before continuing, install and authenticate the CLI by following Install the RisingWave Cloud CLI.
Once rwc cluster list runs successfully in your chosen region, you are ready to create a BYOC environment.
Choose an IPv4 CIDR block of /19 or larger for a new BYOC environment, with a prefix length from /15 through /19. For example, 10.0.0.0/19 meets the minimum size. Private AWS environments with Internet access disabled can use /21 or larger, with a prefix length from /15 through /21. Smaller address ranges do not provide enough IP capacity for the supported infrastructure.
Create a BYOC environment
Follow the steps below to create your own cloud environment.- Navigate to the Projects page and click Create project.
- Select a deployment mode. Choose BYOC.
- Select a service provider. Choose your cloud platform (AWS, GCP, or Azure) and your preferred region. See Resource and permission for more details.
-
Prepare the BYOC environment section. Click Setup now and follow the steps to set up your BYOC environment. Please note that the final command
rwc byoc apply --name xxxmay take 30 to 40 minutes to complete, and a progress bar will keep you informed of its progress. During this time, it’s crucial to ensure a stable internet connection. If the command is interrupted or fails due to network instability, you can safely retry it. - Select compute size in RWU. For most users, standard sizes offer the best performance and cost balance. Choose Custom if the standard sizes don’t meet your workload requirements. To learn more about the nodes, see the architecture of RisingWave.
- Click Summary, then Confirm, and run the command that appears to set up a BYOC cluster in your environment.
Configure custom settings
RisingWave provides several custom settings for BYOC deployments. To enable this feature, you need to create a configuration file containing the custom settings. These settings can be applied when creating a new BYOC environment or updating an existing one. Below are all supported custom settings:General settings
Deploy in a different region
By default, RisingWave deploys your BYOC environment in the same region as its RisingWave Cloud control plane. To deploy the environment in a different region, set the top-levelregion field when you create it.
The control plane and BYOC environment must use the same cloud provider. Cross-region BYOC is currently supported on AWS and GCP. Azure environments and private environments without internet access must use the control-plane region.
For a cross-region environment, you must also select exactly three unique zones in the target region:
- On AWS, set
aws_settings.zone_idsto AWS Availability Zone IDs, such asusw2-az1. - On GCP, set
gcp_settings.zonesto zone names, such asus-west1-a.
- AWS
- GCP
rwc byoc custom-settings describe --name <environment-name> to retrieve the current settings. To use another region or set of zones, create a new BYOC environment.
Cross-region GCP environments can be created only in regions enabled by RisingWave. If validation reports that the selected region is unavailable, contact our support team.
AWS settings (aws_settings)
GCP settings (gcp_settings)
Metrics settings (metrics_settings)
Create a configuration file
-
Create a file at path
BYOC_CONFIGwith desired custom settings. You can include only the settings you need and omit others: -
Save the file path
$BYOC_CONFIG, as you will use it in the later steps.
Apply to a BYOC environment
You may either create a new BYOC environment or update your existing one to apply the custom settings.- Create a new BYOC environment
- Update an existing BYOC environment
- Run the following command to create a new BYOC environment with custom settings.
$BYOC_CONFIGis the file path of the config file created in the previous step. Set$BYOC_CIDRto an IPv4 CIDR block that meets the CIDR size requirements, such as10.0.0.0/19.
- Apply custom settings to the new BYOC environment. This may take up to 30 minutes.
Resource and permission
BYOC uses two types of cloud identities with different permission lifecycles:
The predefined roles and policies below are required by the current BYOC implementation. Some of them, such as AWS
*FullAccess policies, GCP *Admin roles, and Azure Contributor roles, are broader than the minimum set of API actions that the services invoke. RisingWave may narrow these permissions in a future release.
- AWS
- GCP
- Azure
-
Required service-linked role
The role
AWSServiceRoleForAutoScalingneeds to be in place. If it is not ready yet, you need to create it manually. See Create a service-linked role for detailed steps. - Required quota increase For optimal performance, the quota for managed node groups per cluster should be increased to 36 or more. See Service quotas for more details.
-
Operator identity — permissions to run
rwc byoc applyandrwc byoc deleteThe customer-managed IAM role or user that runs the CLI requires the following managed policies while creating or deleting a BYOC environment:- AmazonDynamoDBFullAccess
- AmazonEC2FullAccess
- AmazonElasticContainerRegistryPublicReadOnly
- AmazonPrometheusFullAccess
- AmazonS3FullAccess
- AmazonVPCFullAccess
- AWSKeyManagementServicePowerUser
- CloudWatchLogsFullAccess
- IAMFullAccess
For a cross-region environment, the IAM role/user must also allow thevpce:AllowMultiRegionpermission-only action. Ensure that your AWS Organizations service control policies do not deny this action. You can remove these permissions from the operator identity after the command completes. Re-grant them before using that identity for a futurerwc byoc applyorrwc byoc deleteoperation. -
Resources provisioned in BYOC environment
We will set up the following resources in a BYOC environment:
- 1 VPC: including VPC, its subnets, security, and IPs to host all BYOC resources.
- 1 EKS cluster: to host all service and RisingWave clusters workloads.
- 2 S3 buckets: for RisingWave cluster data and infra state data respectively.
- 2 Internal network load balancer: to expose Agent Service and RWProxy.
- (Optional) 1 External network load balancer: to expose RWProxy to the Internet.
- IAM roles for the Cloud Agent, EKS, and Kubernetes workloads.
-
Cloud Agent service account — permissions used inside the BYOC environment
rwc byoc applycreates an IAM role for the Cloud Agent’s Kubernetes service account. The Cloud Agent uses this role for ongoing environment updates and cluster management. Terraform attaches:-
The AWS managed policy
AmazonElasticContainerRegistryPublicReadOnly. -
The AWS managed policy
AmazonEC2ContainerRegistryPullOnlywhen private Helm or container registries are enabled. -
A custom IAM policy with the following actions:
dynamodb:*,ec2:*,elasticloadbalancing:*,autoscaling:*,s3:*,logs:*,iam:*,sqs:*,events:*,eks:*, andkms:*rds:DescribeDBInstances,rds:StopDBInstance,rds:StartDBInstance,rds:CreateDBSubnetGroup,rds:DeleteDBSubnetGroup,rds:ModifyDBSubnetGroup,rds:DescribeDBSubnetGroups,rds:AddTagsToResource,rds:RemoveTagsFromResource, andrds:ListTagsForResourceroute53:AssociateVPCWithHostedZonewhen the private Terraform registry is enabledcloudformation:*androute53resolver:*when private AWS API access is enabled
AmazonEC2FullAccessandAmazonRDSFullAccess, respectively. The ACK IAM controller uses a custom policy for managing the IAM resources required by RisingWave clusters. -
The AWS managed policy
Data encryption
RisingWave Cloud implements comprehensive data encryption to protect your information:Data at rest
- S3 storage: All data stored in AWS S3 is automatically encrypted at rest using AWS default encryption keys
- EBS volumes: All EBS volumes are encrypted at rest using AWS KMS managed keys
- KMS keys are automatically rotated according to AWS security best practices
- This includes all data stored on EBS volumes attached to RisingWave nodes
Data in transit
- Client connections to RisingWave are secured using SSL/TLS
Delete a BYOC environment
Follow the steps below to delete a BYOC environment deployed in your cloud.- Delete all BYOC projects running in the environment. Navigate to the Projects page, click the delete icon to delete all of your BYOC projects.
- Delete resources you created that are not managed by RisingWave, such as VPC Peerings, GCP Firewalls, and other common resources you might have used.
-
Open the terminal and execute the following commands: