OpenSourceBrain / OSBv2

An updated version of the Open Source Brain platform
https://www.v2.opensourcebrain.org/
Other
12 stars 6 forks source link

Stop pods after a given amount of time for not authenticathed users #599

Open filippomc opened 2 years ago

filippomc commented 2 years ago

for osb deployments without login, to discourage mining

filippomc commented 2 years ago

The max-age parameter from jupyterhub allows us to define a maximum amount of time after which the pod is culled even if not idle: https://github.com/jupyterhub/jupyterhub-idle-culler#command-line-flags.

We can set this value in any jupyterhub deployment easily inside and outside osb. @pgleeson any preference on the time to set?

filippomc commented 2 years ago

I think 15 minutes to a few hours should be ok to discourage profitable mining, depending on how much we want to be aggressive. Probably NetPyNE sessions need more time than NWB explorer ones

filippomc commented 2 years ago

Think about a way to notify the user the session will expire

filippomc commented 1 year ago

The max-age parameter works as expected but there is no feedback to the user until a page refresh: image.png. The only solution would be to add a message to netpyne and nwb explorer applications whenever the server goes down. Another solution would be to warn preemptively during the loading that the server will expire after a given amount of time