hypothesis / hypothesis/lms

Set up sticky sessions to prevent version skew during deployment

Open
#5,739 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
53
Forks
16
Avg merge
14d 5h
Merged PRs (30d)
14

Description

We currently don't have any measures in place to prevent version skew during deployment. This means that it is possible for a brief period during deployment that a user receives different parts of a page load (initial HTML, assets, API requests made by client JS) from the old and new versions of the code. If there is an incompatibility introduced between these different components of a page between the old and new app, this could cause the load to fail in various ways.

One way we could mitigate this would be to enable sticky sessions / session affinity in the Elastic Beanstalk Application Load Balancer (ALB), such that requests from a client received within a short window of time (however long a deployment lasts) are sent to the same server. See the linked Slack thread below for resources.

This issue applies to other backend applications besides the LMS app, but the lms and h projects are the most complex and heavily used backend parts of Hypothesis.

Slack thread: https://hypothes-is.slack.com/archives/C4K6M7P5E/p1696231989874829
Related issues:
- https://github.com/hypothesis/h-assets/issues/27

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.