Skip to content

Comments

Support running kernels in multiple locations (locally or remote) simultaneously.#1601

Draft
ojarjur wants to merge 11 commits intojupyter-server:mainfrom
ojarjur:ojarjur/gateway-providers
Draft

Support running kernels in multiple locations (locally or remote) simultaneously.#1601
ojarjur wants to merge 11 commits intojupyter-server:mainfrom
ojarjur:ojarjur/gateway-providers

Conversation

@ojarjur
Copy link
Contributor

@ojarjur ojarjur commented Feb 14, 2026

This PR extends the Jupyter server to support running kernels using multiple separate MappingKernelManagers simultaneously.

For example, you can run both local kernels and Kernel Gateway kernels at the same time without having to reconfigure (and restart) the server.

The topology for how these separate managers are plugged together is configurable, with the configuration being done by specifying a RoutingProvider class.

This has been discussed multiple times both in issues on the jupyter_server repo and in community meetings.

The most recent and up-to-date such discussion is here.

That issue was opened to give a single place for folks to talk about the overall proposal and to raise any objections or concerns they might have about it.

No such objections have been raised, so I am proceeding with a PR to actually implement the proposal.

ojarjur and others added 11 commits February 13, 2026 22:40
The only differences between GatewaySessionManager and the underlying SessionManager type were:

1. Calling `get_kernel` inside the `kernel_cull` method to determine if the kernel exists.

   The underlying `SessionManager` class was instead checking if the specified kernel_id was
   *in* the MultiKernelManager.

   However, the MultiKernelManager class implements `get_kernel` by indexing into itself,
   so we could make the base SessionManager class also call `get_kernel` and it would be
   made compatible with `GatewayMappingKernelManager` while still remaining compatible
   with any other subclass of MultiKernelManager.

2. Specifying that the `kernel_manager` was of type `GatewayMappingKernelManager`.

   This was unnecessary because the kernel_manager_class was already being set to
   that inside of `serverapp.py`, and the `test_gateway.py` test has been updated
   to verify that the GatewayMappingKernelManager class is in fact being used.
…lass rather than requiring a single, global config
…y and pass calls to `is_alive` down to nested kernel managers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant