Skip to content

[proxy] Add latency to all websocket connections to server #15035

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

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Nov 29, 2022

Description

In #14778 and #14752, latency was added to websocket connections to server from the dashboard by testing the value of the slow_database feature flag on the client side and setting an appropriate header during the websocket connection upgrade handshake.

This approach works for connections to server from the dashboard but not for other websocket connections to server.

This PR moves the evaluation of the feature flag from the dashboard client to proxy, using a 'pre-flight' check just like the one added in #14960 for regular HTTP requests to server /api* requests.

The client side code to check the value of the feature flag will be removed by #15035.

Related Issue(s)

Part of #9198

Closes #14964

How to test

When the slow_database feature flag is enabled for your user id in the preview environment, websocket connections from dashboard are still subject to extra latency.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-slow-database
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

Use the returned `X-Gitpod-Slow-Database` header to direct the ws
connection to either the `slow-server` or `server` deployment.
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-latency-to-ws-connections.16 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Nov 29, 2022
@roboquat roboquat merged commit 69187b2 into main Nov 29, 2022
@roboquat roboquat deleted the af/add-latency-to-ws-connections branch November 29, 2022 14:20
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[db-sync] Add latency to non-dashboard websocket connections to server JSON RPC-API
3 participants