Configure zero-downtime deployments #198

Closed
opened 2024-07-01 10:51:39 +02:00 by Oleg-Komarov · 2 comments
Owner

Now that we get some sustained traffic, it would be good avoid dropping requests due to uwsgi restart during deploys (502 error).

Relying on systemd-managed socket, we should be able to do this with minimal changes to our uwsgi setup.

We should use reload instead of restart: https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#standard-default-boring-graceful-reload-aka-sighup

Now that we get some sustained traffic, it would be good avoid dropping requests due to uwsgi restart during deploys (502 error). ~~Relying on systemd-managed socket, we should be able to do this with minimal changes to our uwsgi setup.~~ We should use reload instead of restart: https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#standard-default-boring-graceful-reload-aka-sighup
Oleg-Komarov self-assigned this 2024-07-01 10:51:50 +02:00
Author
Owner

Testing on staging:

./ansible.sh -i environments/staging install.yaml  --tags uwsgi

brings the service down
to fix:

sudo systemctl enable blender-extensions-staging.socket
sudo systemctl stop blender-extensions-staging.service
sudo systemctl start blender-extensions-staging.socket

UPD: this is no longer relevant, socket unit is not needed
this approach didn't solve the problem of in-flight requests being killed during restart

Testing on staging: ``` ./ansible.sh -i environments/staging install.yaml --tags uwsgi ``` brings the service down to fix: ``` sudo systemctl enable blender-extensions-staging.socket sudo systemctl stop blender-extensions-staging.service sudo systemctl start blender-extensions-staging.socket ``` UPD: this is no longer relevant, socket unit is not needed this approach didn't solve the problem of in-flight requests being killed during restart
Author
Owner

Fixed in d3a48372b4

Fixed in https://projects.blender.org/infrastructure/extensions-website/commit/d3a48372b4f3c078ee580c3425d95157054b8d6e
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/extensions-website#198
No description provided.