IMD SolutionComputing LibraryShop main store

Explainer

Node-RED to Fabric Eventstream HTTP POST: endpoint and SAS token

Edge computing and IIoT Published 5 min read By IMD Solution engineering team

Short answer

A plant PC or edge host running Node-RED can send telemetry to a Microsoft Fabric Eventstream custom endpoint by HTTP POST over outbound HTTPS port 443 using a SharedAccessSignature token in the Authorization header. Check the connection string parameters, keep request payloads within tier size limits, and verify HTTP status codes and Lakehouse rows before trusting continuous ingestion.

A monitor showing a flow editor with wired nodes, beside a keyboard and a small fanless edge computer
On this page
  1. Custom endpoint and SAS token structure
  2. Size limits, throughput rates, and error handling
  3. Outbound connectivity, buffering, and Lakehouse verification
  4. Checking burst ingress against the standard payload limit
  5. Questions asked

A plant PC, box PC, or edge gateway running Node-RED can send telemetry to a Microsoft Fabric Eventstream custom endpoint by sending an HTTP POST over outbound HTTPS (TCP port 443) with a SharedAccessSignature token in the Authorization header. Your decision is straightforward: use a valid, non-expired SAS token aimed at the target endpoint URI, keep each request within the applicable size limit, and verify rows in the Lakehouse with a known test record rather than stopping at the HTTP response code.

For related data-collection and outbound HTTP patterns on the plant floor, see Node-RED HTTP request firewall port details and edge gateway data push overview.

Custom endpoint and SAS token structure #

In Microsoft Fabric Eventstream, adding a custom endpoint source exposes an Event Hubs-compatible connection string in the format Endpoint=sb://eventstream-xxxxxxxx.servicebus.windows.net/;SharedAccessKeyName=key_xxxxxxxx;SharedAccessKey=xxxxxxxx;EntityPath=es_xxxxxxx, as documented in the Fabric Eventstream custom endpoint documentation. From that string, the namespace host, shared access key name, shared access key, and entity path identify where Node-RED posts and how the request is signed.

In the Event Hubs REST interface, requests address .servicebus.windows.net using api-version set to 2014-01 and pass Authorization: SharedAccessSignature sr=<encoded-uri>&sig=<signature-string>&se=<expiry-epoch-seconds>&skn=<key-name> or Authorization: Bearer <token>, as documented in the Event Hubs service REST documentation. Every field in that header has a specific job:

  • Resource URI (sr): URL-encoded target address matching the destination entity or namespace path.
  • Signature (sig): Computed HMAC signature over the encoded URI and expiry timestamp using the shared access key; a mismatched URI or key fails authentication.
  • Expiry (se): Unix epoch timestamp in seconds when the token stops being valid; a pasted token fails once its expiry passes.
  • Key name (skn): Name of the shared access rule (SharedAccessKeyName) used to sign the token.

Payload format and content headers #

The Event Hubs REST reference specifies Content-Type: application/atom+xml;type=entry;charset=utf-8 for standard REST publisher calls in the Event Hubs service REST documentation. If a flow sends JSON payloads or batched messages, test that exact Content-Type header and request body against the live Eventstream endpoint during commissioning rather than assuming a custom JSON media type is accepted without adjustment.

Size limits, throughput rates, and error handling #

Payload size and rate limits depend on the service tier and capacity unit rather than a single universal number. According to the Azure Event Hubs quotas and limits documentation, maximum publication size is 256 KB for Basic, 1 MB for Standard and Premium, and 20 MB for Dedicated clusters, while each Throughput Unit (TU) handles 1 MB/sec or 1,000 events per second ingress and 2 MB/sec or 4,096 events per second egress, with up to 12 authorization rules per namespace, 128 virtual networks, and 128 IP Config rules. The exact tier and throughput unit count for a Fabric Eventstream custom endpoint are not stated in the research notes, so verify those values in your Fabric and Azure configuration before setting batch sizes or poll intervals.

When a request is rejected or fails, check the HTTP status code and error detail before changing flow logic, following the common REST API error codes documentation:

  • HTTP 401 (Unauthorized): Missing or malformed authentication (NoAuthenticationInformation or InvalidAuthenticationInfo), or an expired/wrongly scoped SAS token.
  • HTTP 403 (Forbidden): Authentication failed (AuthenticationFailed), insufficient permissions (InsufficientAccountPermissions), or a disabled account/rule (AccountIsDisabled).
  • HTTP 400 (Bad Request): Invalid header value (InvalidHeaderValue), invalid input (InvalidInput), invalid resource name (InvalidResourceName), or invalid URI (InvalidUri).
  • HTTP 411 (Length Required): Missing Content-Length header (MissingContentLengthHeader).
  • HTTP 500 (Internal Server Error): Server-side fault (InternalError) or timeout (OperationTimedOut).

Outbound connectivity, buffering, and Lakehouse verification #

Outbound traffic from the plant PC or gateway must reach the .servicebus.windows.net endpoint over HTTPS (port 443) and resolve DNS cleanly. If the plant network drops or throttles outbound traffic, buffer unsent readings locally on the PC or upstream data store and retry rather than dropping events silently, while keeping payload sizes comfortably inside the tier limit.

Confirming a 201 status proves only that the ingestion endpoint accepted the HTTP request. To confirm rows actually landed in the Lakehouse, send a test payload with a known tag, value, and timestamp, then query the target Lakehouse table for that exact record after the Eventstream sink completes its write.

Checking burst ingress against the standard payload limit #

This worked example checks an illustrative burst calculation against the Standard and Premium publication limit from the Azure Event Hubs quotas and limits documentation and an illustrative 2,048 B (2 KB) JSON event payload size from a sample Node-RED flow.

  • Inputs: Illustrative single JSON event size = 2,048 B (2 KB) from the sample Node-RED payload structure; illustrative burst batch = 250 events sent in one request; documented publication limit = 1 MB (1,048,576 B in binary units or 1,000,000 B in decimal units) from the Azure Event Hubs quotas and limits documentation for Standard and Premium tiers.
  • Rule in words: Multiply the number of events in one publication request by the size of each event in bytes, then compare the total against the applicable publication size limit for your tier.
  • Arithmetic: 250 events * 2,048 B/event = 512,000 B (500 KiB, or 0.512 MB in decimal units).
  • Result: 512,000 B is below 1,048,576 B (1,000,000 B decimal), leaving 536,576 B of headroom before hitting the Standard and Premium cap (and below 256 KB only if you split into smaller batches or single events).
  • Decision: For a Standard or Premium batch ceiling, send the 250-event 512,000 B burst as-is or in smaller chunks; if your tier enforces a 256 KB (262,144 B) limit, cap each request at no more than 128 of those 2,048 B events (262,144 B) or send one event per request.

Questions asked

Why does an HTTP POST to the Eventstream endpoint return HTTP 401?

An HTTP 401 response indicates missing or invalid authentication information, which happens when a SharedAccessSignature token has expired, its signature does not match the target URI or key, or the Authorization header is omitted. Generate a fresh token for the exact target resource URI and key name rather than reusing an expired string.

How many combined sources and destinations can one Fabric Eventstream use with a custom endpoint?

A single Fabric Eventstream supports up to 11 combined sources and destinations when using Custom endpoint sources and Custom endpoint or eventhouse direct-ingestion destinations. Plan your stream topology against that cap before adding extra feeds.

How many throughput units are available per Event Hubs namespace by default?

The Event Hubs documentation states throughput capacity in per-throughput-unit rates of 1 MB per second or 1,000 events per second ingress and 2 MB per second or 4,096 events per second egress, plus up to 12 authorization rules per namespace. It does not state a fixed default throughput unit count for every deployment, so check your active namespace or Eventstream capacity settings.

What should you check if HTTP POST calls succeed with 201 but rows do not appear in the Lakehouse?

Confirm the destination binding from the Eventstream to the Lakehouse and check the target table or event path after sending a known test record with a distinct timestamp and identifier. A 201 response confirms request acceptance at the endpoint, not completed downstream Lakehouse table writes.

Keep reading

  • How-to

    Connect Node-RED to InfluxDB 2.6 with the v2 API

    Yes: node-red-contrib-influxdb writes to InfluxDB 2.6 over the v2 API. Set the configuration node to 2.0, enter the server URL and API token, then the organization and bucket, and confirm with one controlled test write that shows up in a query against that bucket.

    Edge computing and IIoT

  • Troubleshooting

    Fix ECONNREFUSED when Node-RED connects to a remote SQL database

    ECONNREFUSED 127.0.0.1:3306 means the MySQL node dialed loopback on the machine running Node-RED, so the database computer was never contacted. Put the database computer's LAN address in the node's Host field, confirm MariaDB listens on that interface with TCP 3306 open, and create the account with the edge device's address as its host part.

    Edge computing and IIoT

  • Troubleshooting

    Why gRPC ingestion fails when the TCP port test still passes

    A passing TCP port test proves only that the listener accepted a connection at that instant; gRPC ingestion also needs a live service, a negotiated HTTP/2 session and capacity behind the port. When both store-and-forward nodes drop together and burst on recovery, diagnose the historian host's service lifecycle, saturation and endpoint limits, not the network.

    Edge computing and IIoT

Event logging in Ignition Edge with one delimited string tag