-
Notifications
You must be signed in to change notification settings - Fork 198
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
Split apart web server and build server #795
Comments
Just a thought, wouldn't it a possible intermediate step to just add a second server that just uses the same database and bucket? Then the webserver could benefit from having less load, and we can slowly work on the webhook logic |
IIRC the blocker last time I touched this was the metrics, currently the builder metrics are merged into the web server metrics to get to prometheus. We would either need the metrics from the builder to be stored into the database to then be served by the web server, or pushed direct from the builder to prometheus somehow. Once those are sorted running two processes for this should be trivial. |
A possible approach for the metrics would be to run a really small webserver out of the builder that just exposes a |
Just a thought, not sure if we should do it in the first version already: when the goal is to be able to just rebuild instances via ansible then we perhaps should start
IMO as long as we only have one build server (that also manages the queue & crates-index-diff) we don't need #1011 and we can just reboot / recreate the machine. There would be a initial performance hit on every new build-server (downloading the toolchain, docker image etc), and also for every new webserver (local archive indexes come to mind, not sure if there is more). For webservers it would be theoretically possible to run multiple machines with a ELB, while I actually prefer better caching on the CDN (#1552 and/or #1560 ) |
Some additional thoughts on this, steps to be able to horizontally scale the build-server: separate registry watcherWe move the registry-watcher into a separate container / process that only exists once, saving the last seen ref additionally in the database to survive restarts, and to be able to just recreate the machine any time we want. allow multiple build servers
2 should scale well enough for a low number of build servers (<50) and wouldn't need much change to the current logic. |
That's a great idea, that could be deployed to ECS. |
I assume ECS has something that can run a command every hour? @pietroalbini |
I would create a single binary that includes the registry watcher and update-repository-fields all together tbh. ECS has something to run periodic tasks but if we can avoid more pieces of infra I'd be happier. |
that's possible, thank you for the input! |
One additional thing that might make sense is to a do complete redesign of the web/build/watcher entrypoints now before we move to the new infra. The current CLI interface doesn't entirely make sense with the separation. Probably by making sure we have good new entrypoints used by the new infra then deleting the |
@Nemo157 there is already the |
I don't think we should wait on it for setting up the infrastructure, it'd make more sense as a back-and-forth of "here's the independent services we are running on the new infrastructure, how can we improve the interface for them" and try to get that done before we switch over production. (I guess we're most of the way there with |
It probably makes sense to close this issue then as the split has successfully been done. Perhaps we can then create new issues for improving the interface further. |
Currently, all web requests are served from the same server that performs the crate builds. This has given us trouble in the past, since builds consume a lot of resources, driving up response times for web requests. It would be useful to instead have different servers for the website and builds.
Possible implementation:
queued
,finished
, andassigned
, whereassigned
means there is a build server currently building that crate (Add crates to the database before building them #1011).Benefits:
@pietroalbini has experience with implementing this for crater and is helping a lot with the design aspect.
The text was updated successfully, but these errors were encountered: