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

bluegreen strategy disclaimer for sticky sessions doc #1821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions blueprints/sticky-sessions.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
date: 2024-07-17
---

<div class="important">
The methods described in this Blueprint won't work with a [Bluegreen deployment strategy](https://fly.io/docs/launch/deploy/#deployment-strategy) because all the Machines in your app are replaced—the old Machines are destroyed and their IDs are no longer relevant.

Check failure on line 10 in blueprints/sticky-sessions.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'bluegreen' instead of 'Bluegreen'. Raw Output: {"message": "[Vale.Terms] Use 'bluegreen' instead of 'Bluegreen'.", "location": {"path": "blueprints/sticky-sessions.html.md", "range": {"start": {"line": 10, "column": 60}}}, "severity": "ERROR"}
</div>

In a number of scenarios, it is important to ensure that certain requests are
routed to a specific Machine. This frequently is expressed in the form of
wanting an entire user's session to be processed by the same Machine.
Expand Down Expand Up @@ -66,7 +70,7 @@

This approach can be implemented entirely on the server. This will require an additional "hop" to route requests and [is limited to payloads of 1 megabyte](https://fly.io/docs/networking/dynamic-request-routing/#limitations).

The example below creates [Express Middleware](https://expressjs.com/en/guide/using-middleware.html) that creates cookies containing the desired Machine id, and then replays requests that arrive at the wrong destination:

Check failure on line 73 in blueprints/sticky-sessions.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'middleware' instead of 'Middleware'. Raw Output: {"message": "[Vale.Terms] Use 'middleware' instead of 'Middleware'.", "location": {"path": "blueprints/sticky-sessions.html.md", "range": {"start": {"line": 73, "column": 36}}}, "severity": "ERROR"}

```js

Expand Down
Loading