If you are running self-hosted RisingWave (Operator/Helm/bare metal), use Ingest data from webhook. The same
webhook table can also accept WebSocket ingest at ws://<frontend-host>:4560/ingest/<database>/<schema>/<table>.How managed WebSocket routing works
In managed RisingWave Cloud, WebSocket ingest connections are accepted by RWProxy over WSS and forwarded to your project’s frontend ingest listener.- Public ingress: WSS
:443 - Ingest path format:
/ingest/<database>/<schema>/<table>
- Hosted projects: SNI hostname first, then
tenantquery parameter fallback. - BYOC projects: currently use the
tenantquery parameter (SNI is not supported).
Prerequisites
- A running RisingWave Cloud project.
- The tenant identifier of your project (for example,
rwc-g1huxxxxxx-mycluster). - A
webhooktable in your target database/schema.
Hosted vs BYOC requirements
| Project type | Tenant routing requirement | TLS note |
|---|---|---|
| Hosted | Use wss://<cloud-host>/ingest/<database>/<schema>/<table>. Hosted projects support SNI routing, with query-parameter fallback. | Use standard TLS verification. |
| BYOC | Use wss://<cloud-host>/ingest/<database>/<schema>/<table>?tenant=<tenant identifier>. BYOC currently does not support SNI routing. | TLS verification can fail in some BYOC environments. For testing, disable verification in your client temporarily. |
Use the Cloud Portal WebSocket ingest wizard (recommended)
Use the wizard as the primary setup path so you do not need to manually construct hostnames, endpoint URLs, or signature validation SQL. Wizard steps:- Open your project workspace and go to Data Catalog.
- Click Create source.
- Open WebSocket ingest.
- Select Database, Schema, and Target table.
- If you do not have a target table yet, click Create table, enter the table name and signature settings, review the generated SQL, and create the table.
- Copy the generated Endpoint.
- Expand Wire format and Client demo to copy the generated init frame, DML batch examples, and client template.



If WebSocket ingest does not appear in your Cloud Portal yet, use the manual endpoint format below as a fallback.
Manual endpoint format
In hosted projects, use the following URL format:Reference SQL and client example
Use these as reference commands. In practice, prefer the wizard-generated SQL, endpoint, and client template. Create a WebSocket ingest target table Create awebhook table with signature validation. The WebSocket connection reuses the same validation logic as the HTTP webhook endpoint.
Protocol reference
Use the following protocol after connecting to the WebSocket endpoint:- Handshake header:
x-rw-signature: sha256=<hmac_of_init_message> - First frame:
{"type":"init","timestamp":<epoch_ms>} - DML batch frame:
{"dml_batch_id":<u64>,"items":[{"op":"upsert|insert|update|delete","data":{...}}]} - Server ack:
{"ack":<dml_batch_id>} - Fatal error:
{"fatal":"<reason>"}
- The init frame must be the first text frame.
timestampmust be a non-negative epoch millisecond within the configured clock-skew window.dml_batch_idmust increase monotonically within a connection.- Empty batches are valid and are acknowledged immediately.
- Non-empty batches are acknowledged after the batch is accepted downstream.
- Any fatal error closes the connection.
insertandupdateuse the same upsert-style row handling asupsert.
x-rw-webhook-json-timestamp-handling-modex-rw-webhook-json-timestamptz-handling-modex-rw-webhook-json-time-handling-modex-rw-webhook-json-bigint-unsigned-handling-modex-rw-webhook-json-handle-toast-columns
Python client example
This example computes the HMAC of the init frame, opens the WebSocket connection, sends one batch, and waits for the ack.HTTP webhook vs WebSocket ingest
| Option | Best for | Transport | Delivery pattern |
|---|---|---|---|
| HTTP webhook | Per-event pushes from SaaS webhook providers | HTTPS POST | One request per event |
| WebSocket ingest | Low-latency app-driven streaming and batched DML | Long-lived WSS connection | Async batch acknowledgements |
Troubleshooting
- Invalid signature: recompute
x-rw-signaturefrom the exact init frame bytes. - Stale or skewed init timestamp: regenerate the init frame immediately before connecting.
- Non-monotonic
dml_batch_id: increase the batch ID for every batch sent on the same connection. - Missing primary key fields: include all PK columns for
upsert,insert,update, anddelete. - JSON decode failures: verify field names, value types, and any
x-rw-webhook-json-*decoder headers.