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

Scale the application #1

Closed
severo opened this issue Aug 3, 2021 · 4 comments
Closed

Scale the application #1

severo opened this issue Aug 3, 2021 · 4 comments

Comments

@severo
Copy link
Collaborator

severo commented Aug 3, 2021

Both uvicorn and pm2 allow specifying the number of workers. pm2 seems interesting since it provides a way to increase or decrease the number of workers without restart.

But before using multiple workers, it's important to instrument the app in order to detect if we need it (eg: monitor the response time).

@julien-c
Copy link
Member

julien-c commented Aug 6, 2021

note that orthogonally to scalability, we need to "guarantee" that row fetches from moon-landing will be under a specified latency (to be discussed), even in the case of cache misses in datasets-preview-backend

because the data will be needed at server-rendering time, for content to be parsed by Google

What's a reasonable latency you think you can achieve?

If it's too long we might want to pre-warm the cache for all (streamable) dataset, using a system based on webhooks from moon-landing for instance

@julien-c
Copy link
Member

julien-c commented Aug 6, 2021

Re. scalability, let's not focus on this too much because we'll work with the Infra team to productionize this when the time comes, and architecture will surely change.

The current scope of work is to deploy a prototype that lets us iterate on the product definition, interaction with the datasets lib, etc (cc @n1t0 for visibility and context!)

@severo
Copy link
Collaborator Author

severo commented Sep 2, 2021

Philip's recommendation on https://huggingface.slack.com/archives/CTKK32GE8/p1630590091040300?thread_ts=1630588820.038000&cid=CTKK32GE8:

and for scaling I would definitely recommend to switch to docker/container and then there are many options how you can make your service scalable (edited)

@severo severo closed this as completed Feb 4, 2022
@severo severo added wontfix This will not be worked on and removed wontfix This will not be worked on labels Feb 4, 2022
@severo severo reopened this May 3, 2022
@severo
Copy link
Collaborator Author

severo commented May 11, 2022

Replaced with #223

@severo severo closed this as completed May 11, 2022
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

2 participants