liveBook · Manning

Stream processing instance

As explained in MongoDB 8.0 in Action, Third Edition

A stream processing instance is an Atlas resource namespace associated with connection, deployment, and security configuration for running stream processors.

A stream processing instance (SPI) is an Atlas namespace for one or more continuously running stream processors. It is tied to a connection string, cloud provider, region, and optional security context. Processors created in one instance remain available only within that instance. section 15.4.1 section 15.9

Figure 15.4 A stream processing instance is composed of multiple stream processors, such as aggregation-1 and aggregation-2, each dedicated to a specific task within the stream processing environment. These processors reside within the stream instance and are closely tied to the Connection Registry, which serves as a key store for managing secure connections to external resources. The bidirectional arrow between the Connection Registry and the stream instance signifies a dynamic interaction in which the stream instance relies on the registry for credentials or configuration settings to execute processing tasks effectively. (Image © MongoDB 2024 CC BY-NC-SA 3.0)
A diagram of a diagram

Description automatically generated

Shows how multiple stream processors reside inside an instance and use the Connection Registry for credentials and external-service configuration. section 15.4.1

The Connection Registry stores endpoints, authentication credentials, and other settings for external sources and sinks. Registry connections belong exclusively to their instance, can serve multiple processors, and can act as either a source or a sink. section 15.4.1 section 15.9

Create and connect to an SPI with the Atlas CLI and mongosh:

  • Create an instance in AWS Frankfurt with `atlas streams instances create MongoDB-in-Action-SPI --provider "AWS" --region FRANKFURT_DEU`. section 15.6.2
  • List instances with `atlas streams instances list`, then inspect the new instance with `atlas streams instances describe MongoDB-in-Action-SPI`. section 15.6.2
  • Copy the SPI connection string from Atlas, connect with mongosh, and run `sp.listConnections()` to inspect the current registry. section 15.6.2

Capacity scales with processor activity: workers are allocated as processors launch, new processors prefer available workers, and workers can be deprovisioned after all processors on them stop. Project-level management is available through the Project Stream Processing Owner role, while audit logs remain for the SPI lifetime and 30 additional days after deletion. section 15.4.1 section 15.8.1 section 15.8.4

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains namespace boundaries, registry behavior, worker scaling, creation commands, permissions, and audit retention.
Examples
Uses MongoDB-in-Action-SPI in AWS Frankfurt, mongosh connection strings, and the sample_stream_solar registry connection.
What it assumes
Assumes Atlas project access and introduces SPI creation through Atlas CLI, Atlas UI, and mongosh.
What you can do after
Operate/configure an SPI, create it with Atlas CLI, connect through mongosh, and inspect its Connection Registry.
How it connects
Ties stream processing instances to stream processors, the Connection Registry, aggregation pipelines, Atlas CLI, mongosh, and project-level roles.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.