Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safeguard for many status requests #97

Open
sverhoeven opened this issue Jun 4, 2024 · 0 comments
Open

Safeguard for many status requests #97

sverhoeven opened this issue Jun 4, 2024 · 0 comments

Comments

@sverhoeven
Copy link
Member

In i-VRESSE/haddock3-webapp#110 the queued/running page refreshes. This causes a lot more calls to the /api/job/{id} endpoint. And even more when there a bunch of people waiting for the job to complete.

Getting the state of a job from a scheduler like slurm or dirac can be expensive.

We should benchmark how stress-full it is for those schedulers to have lets say a 100(0) users each with 1 job queued or running being checked every 10 seconds.

This could be resolved in different ways:

rate limit

Moves problem to consuming webapp

cache

It would be nice if the state of a job is cached for a configurable duration like 1 minute. So if job state was fetched 5 seconds ago and you fetch again you would get the 5 second old state. If you wait a minute and fetch again you will get a fresh state from the scheduler. This would need saving a last checked timestamp in the database.

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

No branches or pull requests

1 participant