I should add:

JupyterHub version: 0.7.2

The start method of our Rancher spawner is a @gen.coroutine and we do use 
yield

On Thursday, 8 June 2017 12:39:09 UTC+12, Martin Feller wrote:
>
> Hi,
>
> We've recently set up a load-balanced JupyterHub at the University of 
> Auckland for teaching. Notebook servers are spawned in Docker or more 
> precisely through the Rancher API (Rancher is a container management 
> platform). We developed our own Rancher spawner for that. At the moment we 
> support around 300 notebook servers/students.        
> Currently we pre-spawn notebook servers for students through the API so 
> that a student's notebook server is already up and running when he/she 
> comes to the hub.
> This all works very well and services are reliable, lecturers (and I) are 
> happy how smooth things go.
>
> Soon we want to scale to 1000-2000 users, and because we have limited 
> hardware resources in our Rancher platform we need to shut down notebook 
> servers that are unused (culling). If we do that we need to ensure that we 
> can handle 50-100 concurrent requests to start notebook servers if all 
> students of a class want to start and use their notebooks at the same time.
> We recently did some load testing to see how many concurrent requests to 
> start a notebook server can be handled by JupyterHub. Submitting concurrent 
> start requests through the JupyterHub Rest API we see that in a hub there 
> is only one instance of the spawner.start() method running at any time, so 
> if there are 10 concurrent requests these requests are processed 
> sequentially. Once spawner.start() finishes for one request, 
> spawner.start() is run for the next request. Checks to wait for the 
> notebook servers to come up seem happen asynchronously, but not the 
> spawner.start() method (i think this is all controlled by 
> spawn_single_user() in base.py). Doing a Rancher API call to bring up a 
> notebook server and waiting for the endpoint (ip and port) to become 
> available takes up to 5 seconds in our environment, so the sequential 
> processing of spawner.start() we see is a problem for us.
>
> For now my question is: Can an instance of JuypyterHub execute 
> spawner.start() for more than one request at a time? 
> Please correct me on any mistaken views. I'm happy to provide the relevant 
> code snippets of our Rancher spawner (we haven't made if available yet) and 
> more details.
>
> Thanks,
> Martin
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/60abae18-3373-496f-98a9-4a14cf987b1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to