Skip to content

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

Draft
ojarjur wants to merge 5 commits into
jupyter-server:mainfrom
ojarjur:ojarjur/gateway-providers
Draft

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

Conversation

@ojarjur
Copy link
Copy Markdown
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 ojarjur closed this Feb 27, 2026
@ojarjur ojarjur reopened this Feb 27, 2026
@lresende
Copy link
Copy Markdown
Member

@Zsailer

@ojarjur ojarjur force-pushed the ojarjur/gateway-providers branch from f7575ec to eb7ab47 Compare February 28, 2026 00:05
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.
@ojarjur ojarjur force-pushed the ojarjur/gateway-providers branch from 9ea4a4c to 0020293 Compare March 6, 2026 17:29
@ojarjur ojarjur closed this Mar 9, 2026
@ojarjur ojarjur reopened this Mar 9, 2026
@ojarjur ojarjur force-pushed the ojarjur/gateway-providers branch from 0020293 to a0840ae Compare March 11, 2026 17:08
@ojarjur ojarjur force-pushed the ojarjur/gateway-providers branch 3 times, most recently from 682a863 to 97d55ff Compare March 11, 2026 18:48
@ojarjur ojarjur force-pushed the ojarjur/gateway-providers branch 2 times, most recently from b80b7f8 to b3b26bc Compare March 11, 2026 19:12
@ojarjur ojarjur force-pushed the ojarjur/gateway-providers branch from b3b26bc to f84c554 Compare March 12, 2026 00:14
@Carreau Carreau added this to the Future milestone May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants