# Emulating many simultaneous logins?

**URL:** <https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545>\
**Category:** Zero to JupyterHub on Kubernetes\
**Created:** [February 7, 2025, 7:25am UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545 "2025-02-07T07:25:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy\_Dragseth](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roy_dragseth/32/4212_2.png) [@Roy\_Dragseth](https://discourse.jupyter.org/u/Roy_Dragseth)\
**Post date:** [February 7, 2025, 7:25am UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545/1 "2025-02-07T07:25:11Z")

</div>

Is there a way to emulate a login storm? I want to test what happens when 40 to 100 students login at the start of a lecture. Is it possible to script this?

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/minrk/32/13_2.png) [@minrk](https://discourse.jupyter.org/u/minrk)\
**Post date:** [February 7, 2025, 8:36am UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545/2 "2025-02-07T08:36:04Z")

</div>

It is definitely possible to test this. You can write your own tests using the JupyterHub REST API, but this is what [hubtraf](https://github.com/yuvipanda/hubtraf) was written to test, I believe. You can use it directly, or just for inspiration and reference to write your own scripts.

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [February 7, 2025, 1:42pm UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545/3 "2025-02-07T13:42:22Z")

</div>

Another approach is using general purpose tools like [locust](https://github.com/locustio/locust), again generally exciting REST APIs, but can also throw a couple selenium sessions in there to do the full thing. Coupling this with [opentelemetry](https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/tornado/tornado.html) at a couple [key places](https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/sqlalchemy/sqlalchemy.html) can give a very good [picture](https://github.com/jaegertracing/jaeger) of what is really happening When Things Go Wrong.

---

<div class="post-metadata">

**Author:** ![Paul2708](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/paul2708/32/14207_2.png) [@Paul2708](https://discourse.jupyter.org/u/Paul2708)\
**Post date:** [February 7, 2025, 2:05pm UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545/4 "2025-02-07T14:05:53Z")

</div>

There is also [GitHub - IBM/jupyter-tools: Collection of tools for working with JupyterHub and notebooks](https://github.com/IBM/jupyter-tools) to simulate users.  
With the [proposed changes](https://github.com/IBM/jupyter-tools/pull/17), it runs without issues.

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [February 8, 2025, 6:38pm UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545/5 "2025-02-08T18:38:12Z")

</div>

> proposed changes

Welp, having waited my share of time for IBMRedHat PRs to get reviewed… without a customer success advocate, might be waiting a long time for that to get prioritized.

For testing and performance evaluation, this is why general purpose, more broadly-maintained tools can be more robust to keep running over time.

---

<div class="post-metadata">

**Author:** ![Roy\_Dragseth](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/roy_dragseth/32/4212_2.png) [@Roy\_Dragseth](https://discourse.jupyter.org/u/Roy_Dragseth)\
**Post date:** [February 12, 2025, 12:21pm UTC](https://discourse.jupyter.org/t/emulating-many-simultaneous-logins/32545/6 "2025-02-12T12:21:24Z")

</div>

Thanks. Your fork of the jupyter-tools works great!
